CVE-2024-26981 json
nilfs2: fix OOB in nilfs_set_de_type
published 2y ago modified 4mo ago also EUVD-2024-24243
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 19%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix OOB in nilfs_set_de_type
The size of the nilfs_type_by_mode array in the fs/nilfs2/dir.c file is defined as "S_IFMT >> S_SHIFT", but the nilfs_set_de_type() function, which uses this array, specifies the index to read from the array in the same way as "(mode & S_IFMT) >> S_SHIFT".
static void nilfs_set_de_type(struct nilfs_dir_entry *de, struct inode *inode) { umode_t mode = inode->i_mode;
de->file_type = nilfs_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; // oob }
However, when the index is determined this way, an out-of-bounds (OOB) error occurs by referring to an index that is 1 larger than the array size when the condition "mode & S_IFMT == S_IFMT" is satisfied. Therefore, a patch to resize the nilfs_type_by_mode array should be applied to prevent OOB errors.
Patch / fix
- Linux Linux 4.19.313, 5.4.275, 5.10.216, 5.15.157, 6.1.88, 6.6.29, 6.8.8, 6.9
- linux Debian 12 6.1.90-1
- linux Debian 14, Debian 13 6.8.9-1
debian advisories DEBIAN-CVE-2024-26981
- linux Ubuntu 20.04 LTS 5.4.0-189.209
- linux Ubuntu 22.04 LTS 5.15.0-116.126
- linux Ubuntu 24.04 LTS 6.8.0-38.38
- linux-aws Ubuntu 20.04 LTS 5.4.0-1128.138
- linux-aws Ubuntu 22.04 LTS 5.15.0-1065.71
- linux-aws Ubuntu 24.04 LTS 6.8.0-1011.12
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1132.141
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1064.72
ubuntu advisories UBUNTU-CVE-2024-26981
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-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
- kernel-default-base Linux Micro 6.0 6.4.0-17.1.1.51
- kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.5.1
- kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.5.1
suse advisories SUSE-SU-2025:20028-1SUSE-SU-2025:20008-1SUSE-SU-2024:2973-1SUSE-SU-2024:2203-1SUSE-SU-2024:2135-1SUSE-SU-2024:1663-1
- git.kernel.org/stable/c/054f29e9ca05be3906544c5f2a2c7321c30a4243 commit
- git.kernel.org/stable/c/90f43980ea6be4ad903e389be9a27a2a0018f1c8 commit
- git.kernel.org/stable/c/7061c7efbb9e8f11ce92d6b4646405ea2b0b4de1 commit
- git.kernel.org/stable/c/bdbe483da21f852c93b22557b146bc4d989260f0 commit
- git.kernel.org/stable/c/897ac5306bbeb83e90c437326f7044c79a17c611 commit
- git.kernel.org/stable/c/2382eae66b196c31893984a538908c3eb7506ff9 commit
- git.kernel.org/stable/c/90823f8d9ecca3d5fa6b102c8e464c62f416975f commit
- git.kernel.org/stable/c/c4a7dc9523b59b3e73fd522c73e95e072f876b16 commit
Is CVE-2024-26981 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor 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-26981 updated cvss 5.5
kernel: nilfs2: fix OOB in nilfs_set_de_type
-
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 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot 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
- 2y ago
Exploit prediction
0.27% chance of exploitation in the next 30 days, higher than 19% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-129 Improper Validation of Array Index
- Technology feeds
References
-
git.kernel.org
/stable/c/054f29e9ca05be3906544c5f2a2c7321c30a4243
patch
-
git.kernel.org
/stable/c/90f43980ea6be4ad903e389be9a27a2a0018f1c8
patch
-
git.kernel.org
/stable/c/7061c7efbb9e8f11ce92d6b4646405ea2b0b4de1
patch
-
git.kernel.org
/stable/c/bdbe483da21f852c93b22557b146bc4d989260f0
patch
-
git.kernel.org
/stable/c/897ac5306bbeb83e90c437326f7044c79a17c611
patch
-
git.kernel.org
/stable/c/2382eae66b196c31893984a538908c3eb7506ff9
patch
-
git.kernel.org
/stable/c/90823f8d9ecca3d5fa6b102c8e464c62f416975f
patch
-
git.kernel.org
/stable/c/c4a7dc9523b59b3e73fd522c73e95e072f876b16
patch
-
lists.debian.org
/debian-lts-announce/2024/06/msg00017.html
mailing-list, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2024/06/msg00020.html
mailing-list, third-party-advisory
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/
Sources
- CVE List CVE-2024-26981
- NVD CVE-2024-26981
Fencer Intel 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.