7.8

CVE-2024-41045: linux Use After Free

CVSS: 7.8v3.1HighModified
AliasesUBUNTU-CVE-2024-41045DEBIAN-CVE-2024-41045
Published 29-07-2024Last modified 03-10-2026

Vulnerability summary

CVE-2024-41045 is a high (CVSS 7.8) Use After Free vulnerability in linux. EPSS estimates a 0.29% chance of exploitation in the next 30 days, higher than 19.7% of scored vulnerabilities.

Overall risk
31/100
0100
Medium · default modelHow is this calculated?
CVSS score
7.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.29%
0%100%
Low · +0.02 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 18 · Related 18

Timeline

  1. 29-07-2024
    PublishedVulnerability first disclosed.
  2. 03-10-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

5 scores · 4 sources · 2 versions

EPSS trend

Probability

0.29%

Chance of exploitation in the next 30 days

Percentile

20%

Versus all other CVEs

30-day change

+0.02 pp

From 0.27% on 19-09-2026

19-09-202619-10-2026
EPSS score
0.29%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Ubuntu118 products
  • linuxAll versions (No fix recorded) | < 6.8.0-48.48
  • linux-allwinner-5.19All versions (No fix recorded)
  • linux-awsAll versions (No fix recorded) | < 6.8.0-1018.20
  • linux-aws-5.0All versions (No fix recorded)
  • linux-aws-5.11All versions (No fix recorded)
Linux2 products
  • linux≥ b00628b1c7d595ae5b544e059c27b1f5828314b4, < 5eaa11c500ed07f505f86cec07d5593a71927e26 | ≥ b00628b1c7d595ae5b544e059c27b1f5828314b4, < 7aa5a19279c3639ae8b758b63f05d0c616a39fa1 | ≥ b00628b1c7d595ae5b544e059c27b1f5828314b4, < a6fcd19d7eac1335eb76bc16b6a66b7f574d1d69 | 5.15
  • linux_kernel≥ 5.15, < 6.9.10 | 6.10:rc1 | 6.10:rc2 | 6.10:rc3 | 6.10:rc4 | 6.10:rc5 | 6.10:rc6 | 6.10:rc7
Debian1 product
  • linuxAll versions (No fix recorded) | < 6.9.10-1

3 vendors · 121 products

References

17 links
Show all 17 references