Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel
The following race is possible between bpf_timer_cancel_and_free
and bpf_timer_cancel. It will lead a UAF on the timer->timer.
bpf_timer_cancel();
spin_lock();
t = timer->time;
spin_unlock();
bpf_timer_cancel_and_free();
spin_lock();
t = timer->timer;
timer->timer = NULL;
spin_unlock();
hrtimer_cancel(&t->timer);
kfree(t);
/* UAF on t */
hrtimer_cancel(&t->timer);
In bpf_timer_cancel_and_free, this patch frees the timer->timer
after a rcu grace period. This requires a rcu_head addition
to the "struct bpf_hrtimer". Another kfree(t) happens in bpf_timer_init,
this does not need a kfree_rcu because it is still under the
spin_lock and timer->timer has not been visible by others yet.
In bpf_timer_cancel, rcu_read_lock() is added because this helper
can be used in a non rcu critical section context (e.g. from
a sleepable bpf prog). Other timer->timer usages in helpers.c
have been audited, bpf_timer_cancel() is the only place where
timer->timer is used outside of the spin_lock.
Another solution considered is to mark a t->flag in bpf_timer_cancel
and clear it after hrtimer_cancel() is done. In bpf_timer_cancel_and_free,
it busy waits for the flag to be cleared before kfree(t). This patch
goes with a straight forward solution and frees timer->timer after
a rcu grace period.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.15 | 5.15.150 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.7.7-1 | — |
| Debian 13 | linux | 6.7.7-1 | — |
| Debian 12 | linux | 6.1.82-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | 5.15.0-1044.46 | — |
| Ubuntu 22.04 LTS | linux | 5.15.0-112.122 | USN-6820-1 |
| Ubuntu 22.04 LTS | linux-aws | 5.15.0-1063.69 | USN-6821-3 |
| Ubuntu 22.04 LTS | linux-azure | 5.15.0-1066.75 | USN-6821-4 |
| Ubuntu 22.04 LTS | linux-azure-fde | 5.15.0-1067.76.1 | USN-6821-4 |
| Ubuntu 22.04 LTS | linux-gcp | 5.15.0-1062.70 | USN-6820-1 |
| Ubuntu 22.04 LTS | linux-gke | 5.15.0-1060.66 | USN-6821-1 |
| Ubuntu 22.04 LTS | linux-gkeop | 5.15.0-1046.53 | USN-6821-2 |
| Ubuntu 22.04 LTS | linux-ibm | 5.15.0-1056.59 | USN-6821-1 |
| Ubuntu 22.04 LTS | linux-intel-iotg | 5.15.0-1058.64 | USN-6821-1 |
| Ubuntu 22.04 LTS | linux-kvm | 5.15.0-1060.65 | USN-6821-2 |
| Ubuntu 22.04 LTS | linux-lowlatency | 5.15.0-110.120 | USN-6820-1 |
| Ubuntu 22.04 LTS | linux-nvidia | 5.15.0-1058.59 | USN-6820-2 |
| Ubuntu 22.04 LTS | linux-nvidia-tegra | 5.15.0-1026.26 | — |
| Ubuntu 22.04 LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | — |
| Ubuntu 22.04 LTS | linux-oracle | 5.15.0-1061.67 | USN-6821-1 |
| Ubuntu 22.04 LTS | linux-raspi | 5.15.0-1058.61 | USN-6919-1 |
| Ubuntu 22.04 LTS | linux-riscv +31 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | USN-6820-1 |
| Ubuntu 20.04 LTS | linux-aws-5.15 | 5.15.0-1063.69~20.04.1 | USN-6821-3 |
| Ubuntu 20.04 LTS | linux-azure-5.15 | 5.15.0-1065.74~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-gcp-5.15 | 5.15.0-1062.70~20.04.1 | USN-6820-1 |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gkeop-5.15 | 5.15.0-1046.53~20.04.1 | USN-6821-2 |
| Ubuntu 20.04 LTS | linux-hwe-5.15 | 5.15.0-113.123~20.04.1 | USN-6871-1 |
| Ubuntu 20.04 LTS | linux-ibm-5.15 | 5.15.0-1057.60~20.04.1 | USN-6892-1 |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1058.64~20.04.1 | USN-6828-1 |
| Ubuntu 20.04 LTS | linux-lowlatency-hwe-5.15 | 5.15.0-110.120~20.04.1 | USN-6820-1 |
| Ubuntu 20.04 LTS | linux-nvidia-tegra-5.15 | 5.15.0-1027.27~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-oracle-5.15 | 5.15.0-1061.67~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-riscv-5.15 | 5.15.0-1059.63~20.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2002.2 | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-intel-iot-realtime | 5.15.0-1056.58 | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime | 5.15.0-1064.72 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-aws-fips | 5.15.0-1063.69+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-azure-fips | 5.15.0-1065.74+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips | 5.15.0-111.121+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-gcp-fips | 5.15.0-1062.70+fips1 | — |
| Ubuntu Pro FIPS-preview 22.04 LTS | linux-fips +3 | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | bpftool | 7.3.0-427.28.1.el9_4 | RHSA-2024:4928 |
| RHEL 9 | rv +64 | 5.14.0-427.28.1.el9_4 | RHSA-2024:4928 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9.2 EUS | bpftool | 7.0.0-284.77.1.el9_2 | RHSA-2024:5066 |
| RHEL 9.2 EUS | kernel-rt +14 | 5.14.0-284.77.1.rt14.362.el9_2 | RHSA-2024:5067 |
| RHEL 9.2 EUS | perf +47 | 5.14.0-284.77.1.el9_2 | RHSA-2024:5066 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | bpftool | 7.3.0-427.28.1.el9_4 | ALSA-2024:4928 |
| AlmaLinux 9 | rv +60 | 5.14.0-427.28.1.el9_4 | ALSA-2024:4928 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 9 | kernel | 5.14.0-427.28.1.el9_4 | RXSA-2024:4928, RLSA-2024:4928 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | kernel-64kb +3 | 6.4.0-150600.23.7.3 | SUSE-SU-2024:2203-1 |
| SLES 15 SP6 | kernel-azure +1 | 6.4.0-150600.8.5.4 | SUSE-SU-2024:2135-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.7.3.150600.12.2.7 | SUSE-SU-2024:2203-1 |
| SLES 15 SP6 | kernel-docs | 6.4.0-150600.23.7.4 | SUSE-SU-2024:2203-1 |
| SLES 15 SP6 | kernel-source | 6.4.0-150600.23.7.2 | SUSE-SU-2024:2203-1 |
| SLES 15 SP6 | kernel-syms | 6.4.0-150600.23.7.1 | SUSE-SU-2024:2203-1 |
| SLES 15 SP6 | kernel-syms-azure | 6.4.0-150600.8.5.1 | SUSE-SU-2024:2135-1 |
| SLES 15 SP5 | kernel-64kb +5 | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.48.1 | SUSE-SU-2024:1490-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SLES 15 SP5 | kernel-syms | 5.14.21-150500.55.62.1 | SUSE-SU-2024:1659-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Micro 6.0 | kernel-default-base | 6.4.0-17.1.1.51 | SUSE-SU-2025:20008-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-18.1 | SUSE-SU-2025:20008-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.7.3 | SUSE-SU-2024:2203-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_1 | 1-150600.1.5.1 | SUSE-SU-2024:2973-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_1 | 1-150600.13.3.7 | SUSE-SU-2024:2203-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5-RT_Update_14 | 1-150500.11.5.1 | SUSE-SU-2024:1663-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_13 | 1-150500.11.3.2 | SUSE-SU-2024:1659-1 |
| SUSE Real Time Module 15 SP6 | kernel-rt +3 | 6.4.0-150600.10.5.1 | SUSE-SU-2024:2973-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.6 | dtb-aarch64 +2 | 6.4.0-150600.23.7.1 | SUSE-SU-2024:2203-1 |
| openSUSE Leap 15.6 | kernel-64kb +5 | 6.4.0-150600.23.7.3 | SUSE-SU-2024:2203-1 |
| openSUSE Leap 15.6 | kernel-azure +1 | 6.4.0-150600.8.5.4 | SUSE-SU-2024:2135-1 |
| openSUSE Leap 15.6 | kernel-default-base | 6.4.0-150600.23.7.3.150600.12.2.7 | SUSE-SU-2024:2203-1 |
| openSUSE Leap 15.6 | kernel-docs | 6.4.0-150600.23.7.4 | SUSE-SU-2024:2203-1 |
| openSUSE Leap 15.6 | kernel-rt +3 | 6.4.0-150600.10.5.1 | SUSE-SU-2024:2973-1 |
| openSUSE Leap 15.6 | kernel-source | 6.4.0-150600.23.7.2 | SUSE-SU-2024:2203-1 |
| openSUSE Leap 15.6 | kernel-syms-azure | 6.4.0-150600.8.5.1 | SUSE-SU-2024:2135-1 |
| openSUSE Leap 15.5 | dtb-aarch64 +2 | 5.14.21-150500.55.62.1 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-64kb +7 | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.48.1 | SUSE-SU-2024:1490-1 |
| openSUSE Leap 15.5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.1.82-99.168 | 1.0-0.amzn2023 | ALAS2023-2024-784 |
| Amazon Linux 2023 | perf +14 | 6.1.82-99.168.amzn2023 | ALAS2023-2024-784 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | bpftool | 7.3.0-427.28.1.el9_4 | ELSA-2024-4928 |
| Oracle Linux 9 | rv +27 | 5.14.0-427.28.1.el9_4 | ELSA-2024-4928 |
Advisories 28
- USN-6828-1 linux-intel-iotg-5.15 vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- ALSA-2024:4928 Moderate: kernel security update AlmaLinux Security Advisories · Oct 29, 2026
- USN-6919-1 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6821-4 linux-azure, linux-azure-fde vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6871-1 linux-hwe-5.15 vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6821-1 linux-gke, linux-ibm, linux-intel-iotg, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6820-1 linux, linux-gcp, linux-gcp-5.15, linux-lowlatency, linux-lowlatency-hwe-5.15, linux-xilinx-zynqmp vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6821-2 linux-gkeop, linux-gkeop-5.15, linux-kvm vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6821-3 linux-aws, linux-aws-5.15 vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6892-1 linux-ibm-5.15 vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- USN-6820-2 linux-nvidia vulnerabilities Ubuntu Security Notices (USN) · Oct 27, 2026
- WID-SEC-2024-0773 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 25, 2026
- RHSA-2024:5067 Red Hat Security Advisory: kernel-rt security update Red Hat Security Advisories (RHSA) · Sep 28, 2026
- RHSA-2024:5066 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Sep 28, 2026
- RHSA-2024:4928 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Aug 20, 2026
- SUSE-SU-2025:20008-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- WID-SEC-2024-1913 Red Hat OpenShift Container Platform: Mehrere Schwachstellen BSI CERT-Bund (WID) · Mar 3, 2026
- ALAS2023-2024-784 Important: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 11, 2026
- RLSA-2024:4928 Moderate: kernel security update Rocky Linux Security Advisories · Feb 5, 2026
- RXSA-2024:4928 Moderate: kernel security update Rocky Linux Security Advisories · Feb 5, 2026
- SUSE-SU-2024:2973-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1663-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1490-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2135-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2025-1293 IBM DataPower Gateway: Mehrere Schwachstellen BSI CERT-Bund (WID) · Dec 3, 2025
- SUSE-SU-2024:2203-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025
- SUSE-SU-2024:1659-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2024-4928 Moderate: kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Jul 31, 2024
References
- https://git.kernel.org/stable/c/5268bb02107b9eedfdcd51db75b407d10043368c
- https://git.kernel.org/stable/c/addf5e297e6cbf5341f9c07720693ca9ba0057b5
- https://git.kernel.org/stable/c/8327ed12e8ebc5436bfaa1786c49988894f9c8a6
- https://git.kernel.org/stable/c/7d80a9e745fa5b47da3bca001f186c02485c7c33
- https://git.kernel.org/stable/c/0281b919e175bb9c3128bd3872ac2903e9436e3f