CVE-2024-26868 json
nfs: fix panic when nfs4_ff_layout_prepare_ds() fails
published 2024-04-17 2 y ago modified 2026-08-05 3 mo ago also EUVD-2024-24130
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 49%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
nfs: fix panic when nfs4_ff_layout_prepare_ds() fails
We've been seeing the following panic in production
BUG: kernel NULL pointer dereference, address: 0000000000000065 PGD 2f485f067 P4D 2f485f067 PUD 2cc5d8067 PMD 0 RIP: 0010:ff_layout_cancel_io+0x3a/0x90 [nfs_layout_flexfiles] Call Trace: <TASK> ? __die+0x78/0xc0 ? page_fault_oops+0x286/0x380 ? __rpc_execute+0x2c3/0x470 [sunrpc] ? rpc_new_task+0x42/0x1c0 [sunrpc] ? exc_page_fault+0x5d/0x110 ? asm_exc_page_fault+0x22/0x30 ? ff_layout_free_layoutreturn+0x110/0x110 [nfs_layout_flexfiles] ? ff_layout_cancel_io+0x3a/0x90 [nfs_layout_flexfiles] ? ff_layout_cancel_io+0x6f/0x90 [nfs_layout_flexfiles] pnfs_mark_matching_lsegs_return+0x1b0/0x360 [nfsv4] pnfs_error_mark_layout_for_return+0x9e/0x110 [nfsv4] ? ff_layout_send_layouterror+0x50/0x160 [nfs_layout_flexfiles] nfs4_ff_layout_prepare_ds+0x11f/0x290 [nfs_layout_flexfiles] ff_layout_pg_init_write+0xf0/0x1f0 [nfs_layout_flexfiles] __nfs_pageio_add_request+0x154/0x6c0 [nfs] nfs_pageio_add_request+0x26b/0x380 [nfs] nfs_do_writepage+0x111/0x1e0 [nfs] nfs_writepages_callback+0xf/0x30 [nfs] write_cache_pages+0x17f/0x380 ? nfs_pageio_init_write+0x50/0x50 [nfs] ? nfs_writepages+0x6d/0x210 [nfs] ? nfs_writepages+0x6d/0x210 [nfs] nfs_writepages+0x125/0x210 [nfs] do_writepages+0x67/0x220 ? generic_perform_write+0x14b/0x210 filemap_fdatawrite_wbc+0x5b/0x80 file_write_and_wait_range+0x6d/0xc0 nfs_file_fsync+0x81/0x170 [nfs] ? nfs_file_mmap+0x60/0x60 [nfs] __x64_sys_fsync+0x53/0x90 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0
Inspecting the core with drgn I was able to pull this
>>> prog.crashed_thread().stack_trace()[0] #0 at 0xffffffffa079657a (ff_layout_cancel_io+0x3a/0x84) in ff_layout_cancel_io at fs/nfs/flexfilelayout/flexfilelayout.c:2021:27 >>> prog.crashed_thread().stack_trace()[0]['idx'] (u32)1 >>> prog.crashed_thread().stack_trace()[0]['flseg'].mirror_array[1].mirror_ds (struct nfs4_ff_layout_ds *)0xffffffffffffffed
This is clear from the stack trace, we call nfs4_ff_layout_prepare_ds() which could error out initializing the mirror_ds, and then we go to clean it all up and our check is only for if (!mirror->mirror_ds). This is inconsistent with the rest of the users of mirror_ds, which have
if (IS_ERR_OR_NULL(mirror_ds))
to keep from tripping over this exact scenario. Fix this up in ff_layout_cancel_io() to make sure we don't panic when we get an error. I also spot checked all the other instances of checking mirror_ds and we appear to be doing the correct checks everywhere, only unconditionally dereferencing mirror_ds when we know it would be valid.
Patch / fix
- Linux Linux 6.1.83, 6.6.23, 6.7.11, 6.8.2, 6.9
- linux Debian 12 6.1.85-1
- linux Debian 14, Debian 13 6.7.12-1
debian advisories DEBIAN-CVE-2024-26868
- linux Ubuntu 24.04 LTS 6.8.0-35.35
- linux-aws Ubuntu 24.04 LTS 6.8.0-1009.9
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1008.9
- linux-gke Ubuntu 24.04 LTS 6.8.0-1004.7
- linux-ibm Ubuntu 24.04 LTS 6.8.0-1006.6
- linux-azure Ubuntu 24.04 LTS 6.8.0-1008.8
- linux-raspi Ubuntu 24.04 LTS 6.8.0-1005.5
- linux-riscv Ubuntu 24.04 LTS 6.8.0-35.35.1
ubuntu advisories UBUNTU-CVE-2024-26868
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 9 5.14.0-427.31.1.el9_4
- rv RHEL 9 5.14.0-427.31.1.el9_4
- perf RHEL 9 5.14.0-427.31.1.el9_4
- rtla RHEL 9 5.14.0-427.31.1.el9_4
- bpftool RHEL 9 7.3.0-427.31.1.el9_4
- libperf RHEL 9 5.14.0-427.31.1.el9_4
- kernel-rt RHEL 9 5.14.0-427.31.1.el9_4
- kernel-64k RHEL 9 5.14.0-427.31.1.el9_4
red hat advisories RHSA-2024:5363
- kernel-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-25.1
- kernel-source-rt Linux Micro 6.1, Linux Micro 6.0 6.4.0-25.1
- kernel-livepatch-MICRO-6-0-RT_Update_5 Linux Micro 6.1, Linux Micro 6.0 1-1.1
- kernel-rt Linux Micro 6.0 6.4.0-9.1
- kernel-source-rt Linux Micro 6.0 6.4.0-9.1
- kernel-source Linux Micro 6.0 6.4.0-18.1
- kernel-default Linux Micro 6.0 6.4.0-18.1
- kernel-kvmsmall Linux Micro 6.0 6.4.0-18.1
suse advisories SUSE-SU-2025:20166-1SUSE-SU-2025:20249-1SUSE-SU-2025:20028-1SUSE-SU-2025:20008-1SUSE-SU-2024:2973-1SUSE-SU-2024:2203-1
- kernel AlmaLinux 9 5.14.0-427.31.1.el9_4
- rv AlmaLinux 9 5.14.0-427.31.1.el9_4
- perf AlmaLinux 9 5.14.0-427.31.1.el9_4
- rtla AlmaLinux 9 5.14.0-427.31.1.el9_4
- bpftool AlmaLinux 9 7.3.0-427.31.1.el9_4
- libperf AlmaLinux 9 5.14.0-427.31.1.el9_4
- kernel-rt AlmaLinux 9 5.14.0-427.31.1.el9_4
- kernel-64k AlmaLinux 9 5.14.0-427.31.1.el9_4
almalinux advisories ALSA-2024:5363
- kernel Rocky Linux 9 5.14.0-427.31.1.el9_4
rocky linux advisories RLSA-2024:5363
- git.kernel.org/stable/c/31db25e3141b20e2a76a9f219eeca52e3cab126c commit
- git.kernel.org/stable/c/7ca651b4ec4a049f5a46a0e5ff921b86b91c47c5 commit
- git.kernel.org/stable/c/5ada9016b1217498fad876a3d5b07645cc955608 commit
- git.kernel.org/stable/c/dac068f164ad05b35e7c0be13f138c3f6adca58f commit
- git.kernel.org/stable/c/719fcafe07c12646691bd62d7f8d94d657fa0766 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-26868 updated cvss 5.5
kernel: nfs: fix panic when nfs4_ff_layout_prepare_ds() fails
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-427.31.1.el9_4, perf 5.14.0-427.31.1.el9_4, rtla 5.14.0-427.31.1.el9_4, kernel-devel-matched 5.14.0-427.31.1.el9_4, kernel-64k-devel-matched 5.14.0-427.31.1.el9_4, kernel-debug-devel-matched 5.14.0-427.31.1.el9_4, +6 more Red Hat Enterprise Linux BaseOS (v. 9) bpftool 7.3.0-427.31.1.el9_4, kernel 5.14.0-427.31.1.el9_4, kernel-64k 5.14.0-427.31.1.el9_4, kernel-core 5.14.0-427.31.1.el9_4, kernel-tools 5.14.0-427.31.1.el9_4, python3-perf 5.14.0-427.31.1.el9_4, +28 more Red Hat Enterprise Linux CRB (v. 9) libperf 5.14.0-427.31.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.31.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.31.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.31.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.31.1.el9_4 Red Hat Enterprise Linux NFV (v. 9) kernel-rt 5.14.0-427.31.1.el9_4, kernel-rt-kvm 5.14.0-427.31.1.el9_4, kernel-rt-core 5.14.0-427.31.1.el9_4, kernel-rt-modules 5.14.0-427.31.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.31.1.el9_4, kernel-rt-debug-core 5.14.0-427.31.1.el9_4, +6 more Red Hat Enterprise Linux RT (v. 9) kernel-rt 5.14.0-427.31.1.el9_4, kernel-rt-core 5.14.0-427.31.1.el9_4, kernel-rt-modules 5.14.0-427.31.1.el9_4, kernel-rt-debug-core 5.14.0-427.31.1.el9_4, kernel-rt-modules-core 5.14.0-427.31.1.el9_4, kernel-rt-debug-modules 5.14.0-427.31.1.el9_4, +4 morefixed: vendor fix RHSA-2024:5363
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 more Red Hat Enterprise Linux AppStream (v. 9) kernel-headers 5.14.0-427.31.1.el9_4 Red Hat Enterprise Linux CRB (v. 9) kernel-cross-headers 5.14.0-427.31.1.el9_4not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.61% chance of exploitation in the next 30 days, higher than 49% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
- Technology feeds
References
-
git.kernel.org
/stable/c/31db25e3141b20e2a76a9f219eeca52e3cab126c
patch
-
git.kernel.org
/stable/c/7ca651b4ec4a049f5a46a0e5ff921b86b91c47c5
patch
-
git.kernel.org
/stable/c/5ada9016b1217498fad876a3d5b07645cc955608
patch
-
git.kernel.org
/stable/c/dac068f164ad05b35e7c0be13f138c3f6adca58f
patch
-
git.kernel.org
/stable/c/719fcafe07c12646691bd62d7f8d94d657fa0766
patch
Sources
- CVE List CVE-2024-26868
- NVD CVE-2024-26868
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.