# CVE-2024-42105: nilfs2: fix inode number range checks

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 18, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-07-30T07:46:01.061Z
- **Modified:** 2026-08-05T11:35:38.984Z

## Who should check

- Anyone running Linux \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 57235c3c88bb430043728d0d02f44a4efe386476; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 08cab183a624ba71603f3754643ae11cab34dbc4; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 731011ac6c37cbe97ece229fc6daa486276052c5; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< fae1959d6ab2c52677b113935e36ab4e25df37ea; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 9194f8ca57527958bee207919458e372d638d783; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 1c91058425a01131ea30dda6cf43c67b17884d6a; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< e2fec219a36e0993642844be0f345513507031f4
- Anyone running Linux 2.6.30

## Description

In the Linux kernel, the following vulnerability has been resolved:

nilfs2: fix inode number range checks

Patch series "nilfs2: fix potential issues related to reserved inodes".

This series fixes one use-after-free issue reported by syzbot, caused by
nilfs2's internal inode being exposed in the namespace on a corrupted
filesystem, and a couple of flaws that cause problems if the starting
number of non-reserved inodes written in the on-disk super block is
intentionally (or corruptly) changed from its default value.  


This patch (of 3):

In the current implementation of nilfs2, "nilfs-\>ns\_first\_ino", which
gives the first non-reserved inode number, is read from the superblock,
but its lower limit is not checked.

As a result, if a number that overlaps with the inode number range of
reserved inodes such as the root directory or metadata files is set in the
super block parameter, the inode number test macros (NILFS\_MDT\_INODE and
NILFS\_VALID\_INODE) will not function properly.

In addition, these test macros use left bit-shift calculations using with
the inode number as the shift count via the BIT macro, but the result of a
shift calculation that exceeds the bit width of an integer is undefined in
the C specification, so if "ns\_first\_ino" is set to a large value other
than the default value NILFS\_USER\_INO (=11), the macros may potentially
malfunction depending on the environment.

Fix these issues by checking the lower bound of "nilfs-\>ns\_first\_ino" and
by preventing bit shifts equal to or greater than the NILFS\_USER\_INO
constant in the inode number test macros.

Also, change the type of "ns\_first\_ino" from signed integer to unsigned
integer to avoid the need for type casting in comparisons such as the
lower bound check introduced this time.

## Affected and fixed versions

- Linux: \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 57235c3c88bb430043728d0d02f44a4efe386476; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 08cab183a624ba71603f3754643ae11cab34dbc4; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 731011ac6c37cbe97ece229fc6daa486276052c5; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< fae1959d6ab2c52677b113935e36ab4e25df37ea; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 9194f8ca57527958bee207919458e372d638d783; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 1c91058425a01131ea30dda6cf43c67b17884d6a; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< e2fec219a36e0993642844be0f345513507031f4 (cvelist)
- Linux: 2.6.30 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-42105. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-42105.md
Affected: Linux >= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, < 57235c3c88bb430043728d0d02f44a4efe386476; >= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, < 08cab183a624ba71603f3754643ae11cab34dbc4; >= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, < 731011ac6c37cbe97ece229fc6daa486276052c5; >= 8a9d2191e9f43bbcd256a9a…
Fixed in: Linux 57235c3c88bb430043728d0d02f44a4efe386476, Linux 08cab183a624ba71603f3754643ae11cab34dbc4, Linux 731011ac6c37cbe97ece229fc6daa486276052c5, Linux 3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987, Linux 9194f8ca57527958bee207919458e372d638d783, Linux 1c91058425a01131ea30dda6cf43c67b17884d6a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-42105 being exploited?

There is no confirmed exploitation: CVE-2024-42105 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-42105?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-42105?

Linux \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 57235c3c88bb430043728d0d02f44a4efe386476; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 08cab183a624ba71603f3754643ae11cab34dbc4; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 731011ac6c37cbe97ece229fc6daa486276052c5; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< fae1959d6ab2c52677b113935e36ab4e25df37ea; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 9194f8ca57527958bee207919458e372d638d783; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< 1c91058425a01131ea30dda6cf43c67b17884d6a; \>= 8a9d2191e9f43bbcd256a9a6871bd73434c83f2f, \< e2fec219a36e0993642844be0f345513507031f4; Linux 2.6.30.

### Is there a fix for CVE-2024-42105?

Yes. Fixed in Linux 57235c3c88bb430043728d0d02f44a4efe386476, Linux 08cab183a624ba71603f3754643ae11cab34dbc4, Linux 731011ac6c37cbe97ece229fc6daa486276052c5, Linux 3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987, Linux 9194f8ca57527958bee207919458e372d638d783, Linux 1c91058425a01131ea30dda6cf43c67b17884d6a. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-42105?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/57235c3c88bb430043728d0d02f44a4efe386476>
- patch: <https://git.kernel.org/stable/c/08cab183a624ba71603f3754643ae11cab34dbc4>
- patch: <https://git.kernel.org/stable/c/731011ac6c37cbe97ece229fc6daa486276052c5>
- patch: <https://git.kernel.org/stable/c/3be4dcc8d7bea52ea41f87aa4bbf959efe7a5987>
- patch: <https://git.kernel.org/stable/c/fae1959d6ab2c52677b113935e36ab4e25df37ea>
- patch: <https://git.kernel.org/stable/c/9194f8ca57527958bee207919458e372d638d783>
- patch: <https://git.kernel.org/stable/c/1c91058425a01131ea30dda6cf43c67b17884d6a>
- patch: <https://git.kernel.org/stable/c/e2fec219a36e0993642844be0f345513507031f4>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-42105>

HTML: <https://flawdb.com/CVE-2024-42105> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-42105>
