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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-41045— bpf: Defer work in bpf_timer_cancel_and_free

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存在安全漏洞,该漏洞源于在 bpf_timer_cancel_and_free 中,如果两个定时器回调尝试相互取消,或者释放包含定时器的映射元素时,可能发生死锁。

CVSS 7.8 · High EPSS 0.27% · P17

Possible ATT&CK Techniques 1 AI

T1203 · Exploitation for Client Execution

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux b00628b1c7d595ae5b544e059c27b1f5828314b4< 5eaa11c500ed07f505f86cec07d5593a71927e26 affected
b00628b1c7d595ae5b544e059c27b1f5828314b4< 7aa5a19279c3639ae8b758b63f05d0c616a39fa1 affected
b00628b1c7d595ae5b544e059c27b1f5828314b4< a6fcd19d7eac1335eb76bc16b6a66b7f574d1d69 affected
5.15 affected
< 5.15 unaffected
6.6.158≤ 6.6.* unaffected
6.9.10≤ 6.9.* unaffected
6.10≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-41045

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
bpf: Defer work in bpf_timer_cancel_and_free
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Defer work in bpf_timer_cancel_and_free Currently, the same case as previous patch (two timer callbacks trying to cancel each other) can be invoked through bpf_map_update_elem as well, or more precisely, freeing map elements containing timers. Since this relies on hrtimer_cancel as well, it is prone to the same deadlock situation as the previous patch. It would be sufficient to use hrtimer_try_to_cancel to fix this problem, as the timer cannot be enqueued after async_cancel_and_free. Once async_cancel_and_free has been done, the timer must be reinitialized before it can be armed again. The callback running in parallel trying to arm the timer will fail, and freeing bpf_hrtimer without waiting is sufficient (given kfree_rcu), and bpf_timer_cb will return HRTIMER_NORESTART, preventing the timer from being rearmed again. However, there exists a UAF scenario where the callback arms the timer before entering this function, such that if cancellation fails (due to timer callback invoking this routine, or the target timer callback running concurrently). In such a case, if the timer expiration is significantly far in the future, the RCU grace period expiration happening before it will free the bpf_hrtimer state and along with it the struct hrtimer, that is enqueued. Hence, it is clear cancellation needs to occur after async_cancel_and_free, and yet it cannot be done inline due to deadlock issues. We thus modify bpf_timer_cancel_and_free to defer work to the global workqueue, adding a work_struct alongside rcu_head (both used at _different_ points of time, so can share space). Update existing code comments to reflect the new state of affairs.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/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存在安全漏洞,该漏洞源于在 bpf_timer_cancel_and_free 中,如果两个定时器回调尝试相互取消,或者释放包含定时器的映射元素时,可能发生死锁。
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 b00628b1c7d595ae5b544e059c27b1f5828314b4 ~ 5eaa11c500ed07f505f86cec07d5593a71927e26 -
Linux Linux 5.15 -

II. Public POCs for CVE-2024-41045

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

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

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

Other References for CVE-2024-41045 (2)

Same Patch Batch · Linux · 2024-07-29 · 121 CVEs total

CVE-2024-41073 9.8 CRITICAL nvme: avoid double free special payload
CVE-2024-41040 9.8 CRITICAL net/sched: Fix UAF when resolving a clash
CVE-2024-41081 9.8 CRITICAL ila: block BH in ila_output()
CVE-2024-41091 8.8 HIGH tun: add missing verification for short frame
CVE-2024-41046 8.8 HIGH net: ethernet: lantiq_etop: fix double free in detach
CVE-2024-42083 8.8 HIGH ionic: fix kernel panic due to multi-buffer handling
CVE-2024-41090 8.8 HIGH tap: add missing verification for short frame
CVE-2024-41062 8.8 HIGH bluetooth/l2cap: sync sock recv cb and release
CVE-2024-41070 7.8 HIGH KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
CVE-2024-41049 7.8 HIGH filelock: fix potential use-after-free in posix_lock_inode
CVE-2024-41057 7.8 HIGH cachefiles: fix slab-use-after-free in cachefiles_withdraw_cookie()
CVE-2024-41060 7.8 HIGH drm/radeon: check bo_va->bo is non-NULL before using it
CVE-2024-41059 7.8 HIGH hfsplus: fix uninit-value in copy_name
CVE-2024-42075 7.8 HIGH bpf: Fix remap of arena.
CVE-2024-41064 7.8 HIGH powerpc/eeh: avoid possible crash when edev->pdev changes
CVE-2024-42072 7.8 HIGH bpf: Fix may_goto with negative offset.
CVE-2024-41069 7.8 HIGH ASoC: topology: Fix references to freed memory
CVE-2024-41086 7.8 HIGH bcachefs: Fix sb_field_downgrade validation
CVE-2024-42066 7.8 HIGH drm/xe: Fix potential integer overflow in page size calculation
CVE-2024-42064 7.8 HIGH drm/amd/display: Skip pipe if the pipe idx not set properly

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-41045

No comments yet


Leave a comment