Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
NFSv4/flexfiles: reject zero filehandle version count
ff_layout_alloc_lseg() decodes the filehandle-version array count from the flexfiles layout body. The value is used as the count for kzalloc_objs(), and the current code only rejects NULL.
A zero count yields ZERO_SIZE_PTR, which can be stored in dss_info->fh_versions even though later flexfiles paths assume that at least one filehandle version exists.
Reject fh_count == 0 before the allocation, matching the existing zero version_count validation in the flexfiles GETDEVICEINFO parser.
A QEMU/KASAN run with a malformed flexfiles layout hit:
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] RIP: 0010:ff_layout_encode_ff_layoutupdate.isra.0+0x15f/0x750 ff_layout_encode_layoutreturn+0x683/0x970 nfs4_xdr_enc_layoutreturn+0x278/0x3a0 Kernel panic - not syncing: Fatal exception
The patched kernel rejects the malformed layout without KASAN/oops/panic, and a valid fh_count=1 regression still opens, reads, and unmounts cleanly.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , Debian 10 ELS , Debian 11 ELS , Oracle Linux 7 ELS , RHEL 7 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- kernel @ 4.18.0 (+15 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 8 | In Rollout |
129 kernels
|
| AlmaLinux 9 | Released |
128 kernels
|
| Amazon Linux 2023 | Planned | — |
| CentOS 8 | Released |
33 kernels
|
| Debian 11 | In Rollout |
44 kernels
|
| Debian 11 cloud | Released |
24 kernels
|
| Debian 12 | Released |
42 kernels
|
| Debian 13 | Released |
12 kernels
|
| Oracle Linux 8 | Released |
148 kernels
|
| Oracle Linux 9 | Released |
127 kernels
|
| Oracle Linux 9 UEK 7 | Planned | — |
| RHEL 10 | Planned | — |
| RHEL 8 | In Rollout |
145 kernels
|
| RHEL 9 | Released |
126 kernels
|
| Rocky Linux 8 | In Rollout |
107 kernels
|
| Rocky Linux 9 | Released |
103 kernels
|