Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-27031— NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于出现死锁问题。

AI Predicted 4.7 Difficulty: Moderate EPSS 0.20% · P10

Possible ATT&CK Techniques 1 AI

T1499 · Endpoint Denial of Service

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 000dbe0bec058cbf2ca9e156e4a5584f5158b0f9< ad27382f8495f8ef6d2c66c413d756bfd13c0598 affected
000dbe0bec058cbf2ca9e156e4a5584f5158b0f9< 8df1678c021ffeb20ef8a203bd9413f3ed9b0e9a affected
000dbe0bec058cbf2ca9e156e4a5584f5158b0f9< 8a2e5977cecd3cde6a0e3e86b7b914d00240e5dc affected
000dbe0bec058cbf2ca9e156e4a5584f5158b0f9< fd5860ab6341506004219b080aea40213b299d2e affected
6.4 affected
< 6.4 unaffected
6.6.23≤ 6.6.* unaffected
6.7.11≤ 6.7.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-27031

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt The loop inside nfs_netfs_issue_read() currently does not disable interrupts while iterating through pages in the xarray to submit for NFS read. This is not safe though since after taking xa_lock, another page in the mapping could be processed for writeback inside an interrupt, and deadlock can occur. The fix is simple and clean if we use xa_for_each_range(), which handles the iteration with RCU while reducing code complexity. The problem is easily reproduced with the following test: mount -o vers=3,fsc 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file1.bin bs=4096 count=1 echo 3 > /proc/sys/vm/drop_caches dd if=/mnt/nfs/file1.bin of=/dev/null umount /mnt/nfs On the console with a lockdep-enabled kernel a message similar to the following will be seen: ================================ WARNING: inconsistent lock state 6.7.0-lockdbg+ #10 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. test5/1708 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888127baa598 (&xa->xa_lock#4){+.?.}-{3:3}, at: nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x144/0x380 _raw_spin_lock_irqsave+0x4e/0xa0 __folio_end_writeback+0x17e/0x5c0 folio_end_writeback+0x93/0x1b0 iomap_finish_ioend+0xeb/0x6a0 blk_update_request+0x204/0x7f0 blk_mq_end_request+0x30/0x1c0 blk_complete_reqs+0x7e/0xa0 __do_softirq+0x113/0x544 __irq_exit_rcu+0xfe/0x120 irq_exit_rcu+0xe/0x20 sysvec_call_function_single+0x6f/0x90 asm_sysvec_call_function_single+0x1a/0x20 pv_native_safe_halt+0xf/0x20 default_idle+0x9/0x20 default_idle_call+0x67/0xa0 do_idle+0x2b5/0x300 cpu_startup_entry+0x34/0x40 start_secondary+0x19d/0x1c0 secondary_startup_64_no_verify+0x18f/0x19b irq event stamp: 176891 hardirqs last enabled at (176891): [<ffffffffa67a0be4>] _raw_spin_unlock_irqrestore+0x44/0x60 hardirqs last disabled at (176890): [<ffffffffa67a0899>] _raw_spin_lock_irqsave+0x79/0xa0 softirqs last enabled at (176646): [<ffffffffa515d91e>] __irq_exit_rcu+0xfe/0x120 softirqs last disabled at (176633): [<ffffffffa515d91e>] __irq_exit_rcu+0xfe/0x120 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&xa->xa_lock#4); <Interrupt> lock(&xa->xa_lock#4); *** DEADLOCK *** 2 locks held by test5/1708: #0: ffff888127baa498 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: nfs_start_io_read+0x28/0x90 [nfs] #1: ffff888127baa650 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0xa4/0x280 stack backtrace: CPU: 6 PID: 1708 Comm: test5 Kdump: loaded Not tainted 6.7.0-lockdbg+ Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 Call Trace: dump_stack_lvl+0x5b/0x90 mark_lock+0xb3f/0xd20 __lock_acquire+0x77b/0x3360 _raw_spin_lock+0x34/0x80 nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] netfs_begin_read+0x77f/0x980 [netfs] nfs_netfs_readahead+0x45/0x60 [nfs] nfs_readahead+0x323/0x5a0 [nfs] read_pages+0xf3/0x5c0 page_cache_ra_unbounded+0x1c8/0x280 filemap_get_pages+0x38c/0xae0 filemap_read+0x206/0x5e0 nfs_file_read+0xb7/0x140 [nfs] vfs_read+0x2a9/0x460 ksys_read+0xb7/0x140
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于出现死锁问题。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 000dbe0bec058cbf2ca9e156e4a5584f5158b0f9 ~ ad27382f8495f8ef6d2c66c413d756bfd13c0598 -
Linux Linux 6.4 -

II. Public POCs for CVE-2024-27031

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-27031

登录查看更多情报信息。

Other References for CVE-2024-27031 (4)

Same Patch Batch · Linux · 2024-05-01 · 159 CVEs total

CVE-2024-27388 9.8 CRITICAL SUNRPC: fix some memleaks in gssx_dec_option_array
CVE-2024-26953 9.8 CRITICAL net: esp: fix bad handling of pages from page_pool
CVE-2024-26931 8.8 HIGH scsi: qla2xxx: Fix command flush on cable pull
CVE-2024-27053 8.8 HIGH wifi: wilc1000: fix RCU usage in connect path
CVE-2024-26990 8.8 HIGH KVM: x86/mmu: Write-protect L2 SPTEs in TDP MMU when clearing dirty status
CVE-2024-26952 8.3 HIGH ksmbd: fix potencial out-of-bounds when buffer offset is invalid
CVE-2024-27018 8.2 HIGH netfilter: br_netfilter: skip conntrack input hook for promisc packets
CVE-2024-26936 8.2 HIGH ksmbd: validate request buffer size in smb2_allocate_rsp_buf()
CVE-2024-26980 8.2 HIGH ksmbd: fix slab-out-of-bounds in smb2_allocate_rsp_buf
CVE-2024-26954 8.1 HIGH ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
CVE-2024-26994 7.8 HIGH speakup: Avoid crash on very long word
CVE-2024-26966 7.8 HIGH clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays
CVE-2024-26974 7.8 HIGH crypto: qat - resolve race condition during AER recovery
CVE-2024-26976 7.8 HIGH KVM: Always flush async #PF workqueue when vCPU is being destroyed
CVE-2024-27062 7.8 HIGH nouveau: lock the client object tree.
CVE-2024-27061 7.8 HIGH crypto: sun8i-ce - Fix use after free in unprepare
CVE-2024-26983 7.8 HIGH bootconfig: use memblock_free_late to free xbc memory to buddy
CVE-2024-27058 7.8 HIGH tmpfs: fix race on handling dquot rbtree
CVE-2024-27056 7.8 HIGH wifi: iwlwifi: mvm: ensure offloading TID queue exists
CVE-2024-27017 7.8 HIGH netfilter: nft_set_pipapo: walk over current view on netlink dump

Showing top 20 of 159 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-27031

No comments yet


Leave a comment