CVE-2024-26981: nilfs2: fix OOB in nilfs_set_de_type
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix OOB in nilfssetdetype
The size of the nilfstypebymode array in the fs/nilfs2/dir.c file is defined as "SIFMT >> SSHIFT", but the nilfssetdetype() function, which uses this array, specifies the index to read from the array in the same way as "(mode & SIFMT) >> SSHIFT".
static void nilfssetdetype(struct nilfsdirentry de, struct inode inode) { umodet mode = inode->imode;
de->filetype = nilfstypebymode[(mode & SIFMT)>>SSHIFT]; // 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 & SIFMT == SIFMT" is satisfied. Therefore, a patch to resize the nilfstypebymode array should be applied to prevent OOB errors.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-26981?
CVE-2024-26981 is classified as a moderate severity vulnerability due to potential out-of-bounds access in the nilfs2 file system.
How do I fix CVE-2024-26981?
To fix CVE-2024-26981, upgrade to the stable Linux kernel versions 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.10-1, or 6.12.11-1.
What systems are affected by CVE-2024-26981?
CVE-2024-26981 affects various Linux kernel versions ranging from 2.6.30 to 6.9-rc4.
Is CVE-2024-26981 present in Linux distributions?
Yes, CVE-2024-26981 is present in multiple Linux distributions that utilize vulnerable versions of the Linux kernel.
What type of vulnerability is CVE-2024-26981?
CVE-2024-26981 is an out-of-bounds access vulnerability affecting the nilfs2 filesystem in the Linux kernel.