Description
In the Linux kernel, the following vulnerability has been resolved:
fs/netfs/fscache_cookie: add missing "n_accesses" check
This fixes a NULL pointer dereference bug due to a data race which
looks like this:
BUG: kernel NULL pointer dereference, address: 0000000000000008
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] SMP PTI
CPU: 33 PID: 16573 Comm: kworker/u97:799 Not tainted 6.8.7-cm4all1-hp+ #43
Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018
Workqueue: events_unbound netfs_rreq_write_to_cache_work
RIP: 0010:cachefiles_prepare_write+0x30/0xa0
Code: 57 41 56 45 89 ce 41 55 49 89 cd 41 54 49 89 d4 55 53 48 89 fb 48 83 ec 08 48 8b 47 08 48 83 7f 10 00 48 89 34 24 48 8b 68 20 <48> 8b 45 08 4c 8b 38 74 45 49 8b 7f 50 e8 4e a9 b0 ff 48 8b 73 10
RSP: 0018:ffffb4e78113bde0 EFLAGS: 00010286
RAX: ffff976126be6d10 RBX: ffff97615cdb8438 RCX: 0000000000020000
RDX: ffff97605e6c4c68 RSI: ffff97605e6c4c60 RDI: ffff97615cdb8438
RBP: 0000000000000000 R08: 0000000000278333 R09: 0000000000000001
R10: ffff97605e6c4600 R11: 0000000000000001 R12: ffff97605e6c4c68
R13: 0000000000020000 R14: 0000000000000001 R15: ffff976064fe2c00
FS: 0000000000000000(0000) GS:ffff9776dfd40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 000000005942c002 CR4: 00000000001706f0
Call Trace:
<TASK>
? __die+0x1f/0x70
? page_fault_oops+0x15d/0x440
? search_module_extables+0xe/0x40
? fixup_exception+0x22/0x2f0
? exc_page_fault+0x5f/0x100
? asm_exc_page_fault+0x22/0x30
? cachefiles_prepare_write+0x30/0xa0
netfs_rreq_write_to_cache_work+0x135/0x2e0
process_one_work+0x137/0x2c0
worker_thread+0x2e9/0x400
? __pfx_worker_thread+0x10/0x10
kthread+0xcc/0x100
? __pfx_kthread+0x10/0x10
ret_from_fork+0x30/0x50
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>
Modules linked in:
CR2: 0000000000000008
---[ end trace 0000000000000000 ]---
This happened because fscache_cookie_state_machine() was slow and was
still running while another process invoked fscache_unuse_cookie();
this led to a fscache_cookie_lru_do_one() call, setting the
FSCACHE_COOKIE_DO_LRU_DISCARD flag, which was picked up by
fscache_cookie_state_machine(), withdrawing the cookie via
cachefiles_withdraw_cookie(), clearing cookie->cache_priv.
At the same time, yet another process invoked
cachefiles_prepare_write(), which found a NULL pointer in this code
line:
struct cachefiles_object *object = cachefiles_cres_object(cres);
The next line crashes, obviously:
struct cachefiles_cache *cache = object->volume->cache;
During cachefiles_prepare_write(), the "n_accesses" counter is
non-zero (via fscache_begin_operation()). The cookie must not be
withdrawn until it drops to zero.
The counter is checked by fscache_cookie_state_machine() before
switching to FSCACHE_COOKIE_STATE_RELINQUISHING and
FSCACHE_COOKIE_STATE_WITHDRAWING (in "case
FSCACHE_COOKIE_STATE_FAILED"), but not for
FSCACHE_COOKIE_STATE_LRU_DISCARDING ("case
FSCACHE_COOKIE_STATE_ACTIVE").
This patch adds the missing check. With a non-zero access counter,
the function returns and the next fscache_end_cookie_access() call
will queue another fscache_cookie_state_machine() call to handle the
still-pending FSCACHE_COOKIE_DO_LRU_DISCARD.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.17 | 6.1.107 |
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.10.7-1 | — |
| Debian 13 | linux | 6.10.7-1 | — |
| Debian 12 | linux | 6.1.112-1 | DSA-5782-1 |
| Debian 11 | linux-6.1 | 6.1.119-1~deb11u1 | DLA-4008-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux | 6.8.0-50.51 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1020.22 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1020.23 | USN-7196-1 |
| Ubuntu 24.04 LTS | linux-gcp +1 | 6.8.0-1019.21 | USN-7155-1, USN-7154-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1015.19 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-gkeop | 6.8.0-1002.4 | USN-7156-1 |
| Ubuntu 24.04 LTS | linux-ibm | 6.8.0-1017.17 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1019.21.1 | USN-7155-1 |
| Ubuntu 24.04 LTS | linux-oem-6.8 | 6.8.0-1018.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-oracle | 6.8.0-1017.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1016.18 | USN-7154-1 |
| Ubuntu 24.04 LTS | linux-riscv +1 | 6.8.0-50.51.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1020.22~22.04.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1020.23~22.04.1 | USN-7196-1 |
| Ubuntu 22.04 LTS | linux-gcp-6.8 +1 | 6.8.0-1019.21~22.04.1 | USN-7155-1, USN-7154-1 |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-50.51~22.04.1 | USN-7154-2 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1017.18~22.04.1 | USN-7154-1 |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 +1 | 6.8.0-50.51.1~22.04.1 | USN-7154-1 |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 1 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-2015.16 | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1013.14 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | rv +77 | 5.14.0-570.12.1.el9_6 | RHSA-2025:6966 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP6 | kernel-64kb +4 | 6.4.0-150600.23.25.1 | SUSE-SU-2024:3561-1 |
| SLES 15 SP6 | kernel-azure +2 | 6.4.0-150600.8.14.1 | SUSE-SU-2024:3551-1 |
| SLES 15 SP6 | kernel-coco +3 | 6.4.0-15061.6.coco15sp6.1 | SUSE-SU-2024:3553-1 |
| SLES 15 SP6 | kernel-default-base | 6.4.0-150600.23.25.1.150600.12.10.2 | SUSE-SU-2024:3561-1 |
| SLES 15 SP6 | kernel-docs +1 | 6.4.0-150600.23.25.2 | SUSE-SU-2024:3561-1 |
| SLES 15 SP5 | kernel-64kb +6 | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.69.1 | SUSE-SU-2024:3587-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-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:20073-1 |
| SLE Micro 6.0 | kernel-livepatch-MICRO-6-0_Update_3 +1 | 1-1.2 | SUSE-SU-2025:20077-1, SUSE-SU-2025:20073-1 |
| SLE Micro 6.0 | kernel-rt +1 | 6.4.0-11.1 | SUSE-SU-2025:20077-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-20.1 | SUSE-SU-2025:20073-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
| SLE Live Patching 15 SP6 | kernel-default | 6.4.0-150600.23.25.1 | SUSE-SU-2024:3561-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_4 | 1-150600.1.3.1 | SUSE-SU-2024:3564-1 |
| SLE Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_5 | 1-150600.13.3.1 | SUSE-SU-2024:3561-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_20 +1 | 1-150500.11.3.1 | SUSE-SU-2024:3592-1, SUSE-SU-2024:3569-1 |
| SUSE Real Time Module 15 SP6 | kernel-rt +3 | 6.4.0-150600.10.14.1 | SUSE-SU-2024:3564-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.6 | dtb-aarch64 +8 | 6.4.0-150600.23.25.1 | SUSE-SU-2024:3561-1 |
| openSUSE Leap 15.6 | kernel-azure +2 | 6.4.0-150600.8.14.1 | SUSE-SU-2024:3551-1 |
| openSUSE Leap 15.6 | kernel-default-base | 6.4.0-150600.23.25.1.150600.12.10.2 | SUSE-SU-2024:3561-1 |
| openSUSE Leap 15.6 | kernel-docs +1 | 6.4.0-150600.23.25.2 | SUSE-SU-2024:3561-1 |
| openSUSE Leap 15.6 | kernel-rt +3 | 6.4.0-150600.10.14.1 | SUSE-SU-2024:3564-1 |
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.69.1 | SUSE-SU-2024:3587-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.5 | kernel-default | 5.14.21-150500.55.83.1 | SUSE-SU-2024:3569-1 |
| openSUSE Leap Micro 5.5 | kernel-default-base | 5.14.21-150500.55.83.1.150500.6.37.1 | SUSE-SU-2024:3569-1 |
| openSUSE Leap Micro 5.5 | kernel-rt | 5.14.21-150500.13.73.1 | SUSE-SU-2024:3592-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.1.109-118.189 | 1.0-0.amzn2023 | ALAS2023-2024-779 |
| Amazon Linux 2023 | perf +14 | 6.1.109-118.189.amzn2023 | ALAS2023-2024-779 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | 6.6.51.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | bpftool | 7.5.0-802.el9_6 | ELSA-2025-6966 |
| Oracle Linux 9 | rv +28 | 5.14.0-570.12.1.0.1.el9_6 | ELSA-2025-6966 |
Advisories 20
- USN-7154-1 linux, linux-aws, linux-aws-6.8, linux-gcp, linux-gcp-6.8, linux-gke, linux-ibm, linux-lowlatency, linux-lowlatency-hwe-6.8, linux-oem-6.8, linux-oracle, linux-oracle-6.8, linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7155-1 linux-nvidia, linux-nvidia-6.8, linux-nvidia-lowlatency vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7196-1 linux-azure, linux-azure-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7156-1 linux-gkeop vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- USN-7154-2 linux-hwe-6.8 vulnerabilities Ubuntu Security Notices (USN) · Oct 29, 2026
- RHSA-2025:6966 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- WID-SEC-2024-2057 Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service oder unspezifischer Angriff BSI CERT-Bund (WID) · Sep 28, 2026
- SUSE-SU-2025:20073-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:20077-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- DLA-4008-1 linux-6.1 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-5782-1 linux - security update Debian Security (DSA / DLA) · Mar 9, 2026
- ALAS2023-2024-779 Important: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 8, 2026
- SUSE-SU-2024:3551-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3561-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3592-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3564-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3587-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3553-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3569-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- ELSA-2025-6966 Moderate: kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · May 16, 2025