CVE-2025-22002
NoneCVSS
—
EPSS
0.2%
Published
Apr 3, 2025
CISA due date
—
Cloudanix analysis
A flaw in the Linux kernel can make computers using certain file systems suddenly crash when caching fails.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Missing NULL check before calling invalidate_cache in netfs_write_collection_worker causes kernel NULL pointer dereference when NETFS_WRITE_TO_CACHE fails on filesystems such as NFS or Ceph that do not implement the method.
Why it matters to the business
Unexpected kernel crashes on Linux systems lead to downtime, potential loss of in-flight I/O, and operational disruption for workloads relying on netfs caching.
How an attack unfolds
A local process or workload triggers a cache write failure condition in netfs; the collection worker then dereferences a NULL function pointer because invalidate_cache was never implemented by the underlying filesystem, resulting in an immediate kernel panic.
How to fix it
Upgrade the Linux kernel to a version containing commit 0def1a40c3e76a468f8f66aa572caed44ec37277 or later; on affected Red Hat EUS releases update squid to 7:4.4-8.module+el8.1.0+10584+c769fd35.3 (or 7:4.4-8.module+el8.2.0+10583+6e4ac934.3) and libecap to 0:1.0.1-2.module+el8.1.0+4044+36416a77.
How to confirm the fix worked
Confirm the presence of the NULL guard before the invalidate_cache call in netfs_write_collection_worker source; reproduce cache-write failure paths and verify the kernel no longer oopses.
Typical attack path
- Gain local execution on a system using netfs with a filesystem lacking invalidate_cache
- Induce a failed NETFS_WRITE_TO_CACHE operation
- netfs_write_collection_worker executes and hits the missing NULL guard
- Kernel performs supervisor instruction fetch at address 0 and panics
How to detect it
Search kernel logs and dmesg for NULL pointer dereference oopses containing netfs_write_collection_worker, page_fault_oops, and RIP at address 0; correlate with kworker threads performing netfs cache writes.
- BUG: kernel NULL pointer dereference, address: 0000000000000000
- netfs_write_collection_worker+0xe9f/0x12b0
- RIP: 0010:0x0
- Workqueue: events_unbound netfs_write_collection_worker
What your security team should do
- Apply the referenced kernel and package updates within the next maintenance window
- Add kernel oops monitoring for netfs_write_collection_worker signatures
- Limit use of write-to-cache on affected filesystems until patched
The record
In the Linux kernel, the following vulnerability has been resolved: netfs: Call `invalidate_cache` only if implemented Many filesystems such as NFS and Ceph do not implement the `invalidate_cache` method. On those filesystems, if writing to the cache (`NETFS_WRITE_TO_CACHE`) fails for some reason, the kernel crashes like this: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 0 P4D 0 Oops: Oops: 0010 [#1] SMP PTI CPU: 9 UID: 0 PID: 3380 Comm: kworker/u193:11 Not tainted 6.13.3-cm4all1-hp #437 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 10/17/2018 Workqueue: events_unbound netfs_write_collection_worker RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffff9b86e2ca7dc0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 7fffffffffffffff RDX: 0000000000000001 RSI: ffff89259d576a18 RDI: ffff89259d576900 RBP: ffff89259d5769b0 R08: ffff9b86e2ca7d28 R09: 0000000000000002 R10: ffff89258ceaca80 R11: 0000000000000001 R12: 0000000000000020 R13: ffff893d158b9338 R14: ffff89259d576900 R15: ffff89259d5769b0 FS: 0000000000000000(0000) GS:ffff893c9fa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000054442e003 CR4: 00000000001706f0 Call Trace: <TASK> ? __die+0x1f/0x60 ? page_fault_oops+0x15c/0x460 ? try_to_wake_up+0x2d2/0x530 ? exc_page_fault+0x5e/0x100 ? asm_exc_page_fault+0x22/0x30 netfs_write_collection_worker+0xe9f/0x12b0 ? xs_poll_check_readable+0x3f/0x80 ? xs_stream_data_receive_workfn+0x8d/0x110 process_one_work+0x134/0x2d0 worker_thread+0x299/0x3a0 ? __pfx_worker_thread+0x10/0x10 kthread+0xba/0xe0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x30/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Modules linked in: CR2: 0000000000000000 This patch adds the missing `NULL` check.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:13 | linux | 0 | No fix |
| Linux | Kernel | 6.8.0 | 6.12.21 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39884 In the Linux kernel, the following vulnerability has been resolved: btrfs: fix subvolume… Also affects linux
- CVE-2025-39886 In the Linux kernel, the following vulnerability has been resolved: bpf: Tell memcg to… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39880 In the Linux kernel, the following vulnerability has been resolved: libceph: fix invalid… Also affects linux
- CVE-2025-39881 In the Linux kernel, the following vulnerability has been resolved: kernfs: Fix UAF in… Also affects linux
- CVE-2025-39882 In the Linux kernel, the following vulnerability has been resolved: drm/mediatek: fix… Also affects linux