# CVE-2024-47699: nilfs2: fix potential null-ptr-deref in nilfs\_btree\_insert()

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.35% (percentile 22, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-10-21T11:53:35.962Z
- **Modified:** 2026-10-15T01:18:55.323Z

## Who should check

- Anyone running Linux \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 24bf40740a3da6b4056721da34997ae6938f3da1; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 73d23ecf234b7a6d47fb883f2dabe10e3230b31d; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< f68523e0f26faade18833fbef577a4295d8e2c94; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< db73500d3f0e558eb642aae1d4782e7726b4a03f; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 3644554d308ddf2669e459a1551a7edf60b2d62b; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 9403001ad65ae4f4c5de368bdda3a0636b51d51a
- Anyone running Linux 2.6.30

## Description

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

nilfs2: fix potential null-ptr-deref in nilfs\_btree\_insert()

Patch series "nilfs2: fix potential issues with empty b-tree nodes".

This series addresses three potential issues with empty b-tree nodes that
can occur with corrupted filesystem images, including one recently
discovered by syzbot.


This patch (of 3):

If a b-tree is broken on the device, and the b-tree height is greater than
2 (the level of the root node is greater than 1) even if the number of
child nodes of the b-tree root is 0, a NULL pointer dereference occurs in
nilfs\_btree\_prepare\_insert(), which is called from nilfs\_btree\_insert().

This is because, when the number of child nodes of the b-tree root is 0,
nilfs\_btree\_do\_lookup() does not set the block buffer head in any of
path\[x\].bp\_bh, leaving it as the initial value of NULL, but if the level
of the b-tree root node is greater than 1, nilfs\_btree\_get\_nonroot\_node(),
which accesses the buffer memory of path\[x\].bp\_bh, is called.

Fix this issue by adding a check to nilfs\_btree\_root\_broken(), which
performs sanity checks when reading the root node from the device, to
detect this inconsistency.

Thanks to Lizhi Xu for trying to solve the bug and clarifying the cause
early on.

## Affected and fixed versions

- Linux: \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 24bf40740a3da6b4056721da34997ae6938f3da1; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 73d23ecf234b7a6d47fb883f2dabe10e3230b31d; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< f68523e0f26faade18833fbef577a4295d8e2c94; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< db73500d3f0e558eb642aae1d4782e7726b4a03f; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 3644554d308ddf2669e459a1551a7edf60b2d62b; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 9403001ad65ae4f4c5de368bdda3a0636b51d51a (cvelist)
- Linux: 2.6.30 (cvelist)

## Mitigation

- Upgrade Linux to 9403001ad65ae4f4c5de368bdda3a0636b51d51a or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-47699.md
Affected: Linux >= 17c76b0104e4a6513983777e1a17e0297a12b0c4, < 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0; >= 17c76b0104e4a6513983777e1a17e0297a12b0c4, < 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343; >= 17c76b0104e4a6513983777e1a17e0297a12b0c4, < 24bf40740a3da6b4056721da34997ae6938f3da1; >= 17c76b0104e4a6513983777…
Fixed in: Linux 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0, Linux 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343, Linux 24bf40740a3da6b4056721da34997ae6938f3da1, Linux 73d23ecf234b7a6d47fb883f2dabe10e3230b31d, Linux 21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34, Linux 3644554d308ddf2669e459a1551a7edf60b2d62b, Linux 94030…

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-47699 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 24bf40740a3da6b4056721da34997ae6938f3da1; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 73d23ecf234b7a6d47fb883f2dabe10e3230b31d; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< f68523e0f26faade18833fbef577a4295d8e2c94; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< db73500d3f0e558eb642aae1d4782e7726b4a03f; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 3644554d308ddf2669e459a1551a7edf60b2d62b; \>= 17c76b0104e4a6513983777e1a17e0297a12b0c4, \< 9403001ad65ae4f4c5de368bdda3a0636b51d51a; Linux 2.6.30.

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

Yes. Fixed in Linux 2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0, Linux 1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343, Linux 24bf40740a3da6b4056721da34997ae6938f3da1, Linux 73d23ecf234b7a6d47fb883f2dabe10e3230b31d, Linux 21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34, Linux 3644554d308ddf2669e459a1551a7edf60b2d62b, Linux 9403001ad65ae4f4c5de368bdda3a0636b51d51a. Upgrade Linux to 9403001ad65ae4f4c5de368bdda3a0636b51d51a or later.

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

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/24bf40740a3da6b4056721da34997ae6938f3da1>
- patch: <https://git.kernel.org/stable/c/73d23ecf234b7a6d47fb883f2dabe10e3230b31d>
- patch: <https://git.kernel.org/stable/c/f68523e0f26faade18833fbef577a4295d8e2c94>
- patch: <https://git.kernel.org/stable/c/21839b6fbc3c41b3e374ecbdb0cabbbb2c53cf34>
- patch: <https://git.kernel.org/stable/c/db73500d3f0e558eb642aae1d4782e7726b4a03f>
- patch: <https://git.kernel.org/stable/c/3644554d308ddf2669e459a1551a7edf60b2d62b>
- patch: <https://git.kernel.org/stable/c/9403001ad65ae4f4c5de368bdda3a0636b51d51a>
- other: <https://git.kernel.org/stable/c/2b78e9df10fb7f4e9d3d7a18417dd72fbbc1dfd0>
- other: <https://git.kernel.org/stable/c/1d94dbdfbb64cc48d10dec65cc3c4fbf2497b343>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-355557.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-47699>

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