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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-50106— nfsd: fix race between laundromat and free_stateid

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存在安全漏洞,该漏洞源于nfsd模块中,存在竞态条件,导致在释放状态ID时可能出现悬空指针使用。

CVSS 9.8 · Critical EPSS 0.50% · P41

Affected Version Matrix 6

VendorProduct Version RangeStatus
Linux Linux 83e733161fde43e2f99cefa68e369944460fce39< 967faa26f313a62e7bebc55d5b8122eaee43b929 affected
83e733161fde43e2f99cefa68e369944460fce39< 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a affected
6.9 affected
< 6.9 unaffected
6.11.6≤ 6.11.* unaffected
6.12≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-50106

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
nfsd: fix race between laundromat and free_stateid
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix race between laundromat and free_stateid There is a race between laundromat handling of revoked delegations and a client sending free_stateid operation. Laundromat thread finds that delegation has expired and needs to be revoked so it marks the delegation stid revoked and it puts it on a reaper list but then it unlock the state lock and the actual delegation revocation happens without the lock. Once the stid is marked revoked a racing free_stateid processing thread does the following (1) it calls list_del_init() which removes it from the reaper list and (2) frees the delegation stid structure. The laundromat thread ends up not calling the revoke_delegation() function for this particular delegation but that means it will no release the lock lease that exists on the file. Now, a new open for this file comes in and ends up finding that lease list isn't empty and calls nfsd_breaker_owns_lease() which ends up trying to derefence a freed delegation stateid. Leading to the followint use-after-free KASAN warning: kernel: ================================================================== kernel: BUG: KASAN: slab-use-after-free in nfsd_breaker_owns_lease+0x140/0x160 [nfsd] kernel: Read of size 8 at addr ffff0000e73cd0c8 by task nfsd/6205 kernel: kernel: CPU: 2 UID: 0 PID: 6205 Comm: nfsd Kdump: loaded Not tainted 6.11.0-rc7+ #9 kernel: Hardware name: Apple Inc. Apple Virtualization Generic Platform, BIOS 2069.0.0.0.0 08/03/2024 kernel: Call trace: kernel: dump_backtrace+0x98/0x120 kernel: show_stack+0x1c/0x30 kernel: dump_stack_lvl+0x80/0xe8 kernel: print_address_description.constprop.0+0x84/0x390 kernel: print_report+0xa4/0x268 kernel: kasan_report+0xb4/0xf8 kernel: __asan_report_load8_noabort+0x1c/0x28 kernel: nfsd_breaker_owns_lease+0x140/0x160 [nfsd] kernel: nfsd_file_do_acquire+0xb3c/0x11d0 [nfsd] kernel: nfsd_file_acquire_opened+0x84/0x110 [nfsd] kernel: nfs4_get_vfs_file+0x634/0x958 [nfsd] kernel: nfsd4_process_open2+0xa40/0x1a40 [nfsd] kernel: nfsd4_open+0xa08/0xe80 [nfsd] kernel: nfsd4_proc_compound+0xb8c/0x2130 [nfsd] kernel: nfsd_dispatch+0x22c/0x718 [nfsd] kernel: svc_process_common+0x8e8/0x1960 [sunrpc] kernel: svc_process+0x3d4/0x7e0 [sunrpc] kernel: svc_handle_xprt+0x828/0xe10 [sunrpc] kernel: svc_recv+0x2cc/0x6a8 [sunrpc] kernel: nfsd+0x270/0x400 [nfsd] kernel: kthread+0x288/0x310 kernel: ret_from_fork+0x10/0x20 This patch proposes a fixed that's based on adding 2 new additional stid's sc_status values that help coordinate between the laundromat and other operations (nfsd4_free_stateid() and nfsd4_delegreturn()). First to make sure, that once the stid is marked revoked, it is not removed by the nfsd4_free_stateid(), the laundromat take a reference on the stateid. Then, coordinating whether the stid has been put on the cl_revoked list or we are processing FREE_STATEID and need to make sure to remove it from the list, each check that state and act accordingly. If laundromat has added to the cl_revoke list before the arrival of FREE_STATEID, then nfsd4_free_stateid() knows to remove it from the list. If nfsd4_free_stateid() finds that operations arrived before laundromat has placed it on cl_revoke list, it marks the state freed and then laundromat will no longer add it to the list. Also, for nfsd4_delegreturn() when looking for the specified stid, we need to access stid that are marked removed or freeable, it means the laundromat has started processing it but hasn't finished and this delegreturn needs to return nfserr_deleg_revoked and not nfserr_bad_stateid. The latter will not trigger a FREE_STATEID and the lack of it will leave this stid on the cl_revoked list indefinitely.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
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存在安全漏洞,该漏洞源于nfsd模块中,存在竞态条件,导致在释放状态ID时可能出现悬空指针使用。
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 83e733161fde43e2f99cefa68e369944460fce39 ~ 967faa26f313a62e7bebc55d5b8122eaee43b929 -
Linux Linux 6.9 -

II. Public POCs for CVE-2024-50106

# 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-50106

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-50106 (1)

Same Patch Batch · Linux · 2024-11-05 · 50 CVEs total

CVE-2024-50113 8.8 HIGH firewire: core: fix invalid port index for parent device
CVE-2024-50115 8.4 HIGH KVM: nSVM: Ignore nCR3[4:0] when loading PDPTEs from memory
CVE-2024-50125 8.0 HIGH Bluetooth: SCO: Fix UAF on sco_sock_timeout
CVE-2024-50124 8.0 HIGH Bluetooth: ISO: Fix UAF on iso_sock_timeout
CVE-2024-50132 7.8 HIGH tracing/probes: Fix MAX_TRACE_ARGS limit handling
CVE-2024-50091 7.8 HIGH dm vdo: don't refer to dedupe_context after releasing it
CVE-2023-52920 7.8 HIGH bpf: support non-r10 register spill/fill to/from stack in precision tracking
CVE-2024-50101 7.8 HIGH iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices
CVE-2024-50114 7.8 HIGH KVM: arm64: Unregister redistributor for failed vCPU creation
CVE-2024-50127 7.8 HIGH net: sched: fix use-after-free in taprio_change()
CVE-2024-50126 7.8 HIGH net: sched: use RCU read-side critical section in taprio_dump()
CVE-2024-50128 7.8 HIGH net: wwan: fix global oob in wwan_rtnl_policy
CVE-2024-50130 7.8 HIGH netfilter: bpf: must hold reference on net namespace
CVE-2024-50090 7.8 HIGH drm/xe/oa: Fix overflow in oa batch buffer
CVE-2024-50095 7.5 HIGH RDMA/mad: Improve handling of timed out WRs of mad agent
CVE-2024-50094 7.5 HIGH sfc: Don't invoke xdp_do_flush() from netpoll.
CVE-2024-50131 7.3 HIGH tracing: Consider the NULL character when validating the event length
CVE-2024-50096 7.3 HIGH nouveau/dmem: Fix vulnerability in migrate_to_ram upon copy error
CVE-2024-50099 7.3 HIGH arm64: probes: Remove broken LDR (literal) uprobe support
CVE-2024-50117 7.3 HIGH drm/amd: Guard against bad data for ATIF ACPI method

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-50106

No comments yet


Leave a comment