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

Published Jul 29, 2024
·
Updated

bpf: Defer work in bpftimercancelandfree

Affected Software

16 affected componentsFixes available
debian/linux<=6.1.129-1, <=6.1.135-1
5.10.223-15.10.234-16.12.25-16.12.27-1
Linux Linux kernel>=5.15<6.9.10
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3
Linux Linux kernel=6.10-rc4
Linux Linux kernel=6.10-rc5
Linux Linux kernel=6.10-rc6
Linux Linux kernel=6.10-rc7
Microsoft cbl2 kernel 5.15.186.1-1
Microsoft azl3 kernel 6.6.104.2-4
Microsoft azl3 kernel 6.6.117.1-1
Microsoft azl3 kernel 6.6.112.1-2
Microsoft azl3 kernel 6.6.96.2-1
Microsoft azl3 kernel 6.6.96.2-2
Microsoft azl3 kernel 6.6.119.3-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch bpf: Defer work in bpf_timer_cancel_and_free
  3. Configuration

    Modify bpf_timer_cancel_and_free to defer work to the global workqueue by adding a work_struct alongside rcu_head, so cancellation/freeing avoids deadlock-prone inline behavior.

    bpf_timer_cancel_and_free (in Linux kernel BPF hrtimer cancellation path) cancellation/freeing behavior = defer work to the global workqueue using a work_struct alongside rcu_head (work and RCU used at different times)
  4. Configuration

    Use hrtimer_try_to_cancel to fix the cancellation/rearming issue, since the timer cannot be enqueued after async_cancel_and_free.

    bpf_timer_cancel_and_free (timer re-cancel logic) timer cancellation method = use hrtimer_try_to_cancel
  5. Configuration

    Update existing code comments to reflect the new state of affairs: cancellation is deferred to the global workqueue, and after async_cancel_and_free the timer must be reinitialized before it can be armed again.

    bpf_timer_cancel_and_free (code comments/documentation) inline documentation = updated to reflect the new deferred-work and reinitialization state

Event History

Jul 29, 2024
CVE Published
via MITRE·02:32 PM
Data Sourced
via MITRE·02:32 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
Description
Data Sourced
via NVD·03:15 PM
RemedySeverityWeaknessAffected Software
May 5, 2025
Data Sourced
via Ubuntu·12:33 AM
RemedyDescriptionSeverityAffected Software
Sep 3, 2025
Data Sourced
via Microsoft·09:57 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·09:57 PM
Affected Software
Updated
via Microsoft·09:57 PM
Affected Software
Updated
via Microsoft·09:57 PM
SeverityAffected Software
Updated
via Microsoft·09:57 PM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2024-41045?

CVE-2024-41045 has been classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-41045?

To fix CVE-2024-41045, update your Linux kernel to version 5.10.223-1, 5.10.226-1, 6.12.10-1, or 6.12.11-1.

3

Which versions of the Linux kernel are affected by CVE-2024-41045?

CVE-2024-41045 affects Linux kernel versions up to and including 6.1.123-1 and 6.1.119-1.

4

Is CVE-2024-41045 a remote execution vulnerability?

CVE-2024-41045 does not appear to allow for remote code execution but may allow for local privilege escalation.

5

How can I check if I am vulnerable to CVE-2024-41045?

You can verify if you are vulnerable to CVE-2024-41045 by checking your installed Linux kernel version against the affected versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203