# CVE-2023-52900: nilfs2: fix general protection fault 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.31% (percentile 16, 2026-11-28)
- **Published:** 2024-08-21T06:10:40.533Z
- **Modified:** 2026-06-17T06:43:53.593Z

## Who should check

- Anyone running Linux \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 3c2a2ff67d46106715c2132021b98bd057c27545; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< d9fde9eab1766170ff2ade67d09178d2cfd78749; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< b0ba060d3287108eba17603bee3810e4cf2c272d; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 712bd74eccb9d3626a0a236641962eca8e11a243; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 45627a1a6450662e1e0f8174ef07b05710a20062; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 0bf463939c09e5b2c35c71ed74a5fd60a74d6a04; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 7633355e5c7f29c049a9048e461427d1d8ed3051
- Anyone running Linux 2.6.30

## Description

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

nilfs2: fix general protection fault in nilfs\_btree\_insert()

If nilfs2 reads a corrupted disk image and tries to reads a b-tree node
block by calling \_\_nilfs\_btree\_get\_block() against an invalid virtual
block address, it returns -ENOENT because conversion of the virtual block
address to a disk block address fails.  However, this return value is the
same as the internal code that b-tree lookup routines return to indicate
that the block being searched does not exist, so functions that operate on
that b-tree may misbehave.

When nilfs\_btree\_insert() receives this spurious 'not found' code from
nilfs\_btree\_do\_lookup(), it misunderstands that the 'not found' check was
successful and continues the insert operation using incomplete lookup path
data, causing the following crash:

 general protection fault, probably for non-canonical address
 0xdffffc0000000005: 0000 \[\#1\] PREEMPT SMP KASAN
 KASAN: null-ptr-deref in range \[0x0000000000000028-0x000000000000002f\]
 ...
 RIP: 0010:nilfs\_btree\_get\_nonroot\_node fs/nilfs2/btree.c:418 \[inline\]
 RIP: 0010:nilfs\_btree\_prepare\_insert fs/nilfs2/btree.c:1077 \[inline\]
 RIP: 0010:nilfs\_btree\_insert+0x6d3/0x1c10 fs/nilfs2/btree.c:1238
 Code: bc 24 80 00 00 00 4c 89 f8 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89
 ff e8 4b 02 92 fe 4d 8b 3f 49 83 c7 28 4c 89 f8 48 c1 e8 03 \<42\> 80 3c
 28 00 74 08 4c 89 ff e8 2e 02 92 fe 4d 8b 3f 49 83 c7 02
 ...
 Call Trace:
 \<TASK\>
  nilfs\_bmap\_do\_insert fs/nilfs2/bmap.c:121 \[inline\]
  nilfs\_bmap\_insert+0x20d/0x360 fs/nilfs2/bmap.c:147
  nilfs\_get\_block+0x414/0x8d0 fs/nilfs2/inode.c:101
  \_\_block\_write\_begin\_int+0x54c/0x1a80 fs/buffer.c:1991
  \_\_block\_write\_begin fs/buffer.c:2041 \[inline\]
  block\_write\_begin+0x93/0x1e0 fs/buffer.c:2102
  nilfs\_write\_begin+0x9c/0x110 fs/nilfs2/inode.c:261
  generic\_perform\_write+0x2e4/0x5e0 mm/filemap.c:3772
  \_\_generic\_file\_write\_iter+0x176/0x400 mm/filemap.c:3900
  generic\_file\_write\_iter+0xab/0x310 mm/filemap.c:3932
  call\_write\_iter include/linux/fs.h:2186 \[inline\]
  new\_sync\_write fs/read\_write.c:491 \[inline\]
  vfs\_write+0x7dc/0xc50 fs/read\_write.c:584
  ksys\_write+0x177/0x2a0 fs/read\_write.c:637
  do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
  do\_syscall\_64+0x3d/0xb0 arch/x86/entry/common.c:80
  entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
 ...
 \</TASK\>

This patch fixes the root cause of this problem by replacing the error
code that \_\_nilfs\_btree\_get\_block() returns on block address conversion
failure from -ENOENT to another internal code -EINVAL which means that the
b-tree metadata is corrupted.

By returning -EINVAL, it propagates without glitches, and for all relevant
b-tree operations, functions in the upper bmap layer output an error
message indicating corrupted b-tree metadata via
nilfs\_bmap\_convert\_error(), and code -EIO will be eventually returned as
it should be.

## Affected and fixed versions

- Linux: \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 3c2a2ff67d46106715c2132021b98bd057c27545; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< d9fde9eab1766170ff2ade67d09178d2cfd78749; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< b0ba060d3287108eba17603bee3810e4cf2c272d; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 712bd74eccb9d3626a0a236641962eca8e11a243; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 45627a1a6450662e1e0f8174ef07b05710a20062; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 0bf463939c09e5b2c35c71ed74a5fd60a74d6a04; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 7633355e5c7f29c049a9048e461427d1d8ed3051 (cvelist)
- Linux: 2.6.30 (cvelist)

## Mitigation

- Upgrade Linux to 7633355e5c7f29c049a9048e461427d1d8ed3051 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52900.md
Affected: Linux >= a60be987d45dd510aeb54389526f9957cfab106c, < 3c2a2ff67d46106715c2132021b98bd057c27545; >= a60be987d45dd510aeb54389526f9957cfab106c, < d9fde9eab1766170ff2ade67d09178d2cfd78749; >= a60be987d45dd510aeb54389526f9957cfab106c, < b0ba060d3287108eba17603bee3810e4cf2c272d; >= a60be987d45dd510aeb5438…
Fixed in: Linux 3c2a2ff67d46106715c2132021b98bd057c27545, Linux 712bd74eccb9d3626a0a236641962eca8e11a243, Linux 45627a1a6450662e1e0f8174ef07b05710a20062, Linux 0bf463939c09e5b2c35c71ed74a5fd60a74d6a04, Linux 7633355e5c7f29c049a9048e461427d1d8ed3051

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-2023-52900 being exploited?

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

### How serious is CVE-2023-52900?

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

### Which versions are affected by CVE-2023-52900?

Linux \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 3c2a2ff67d46106715c2132021b98bd057c27545; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< d9fde9eab1766170ff2ade67d09178d2cfd78749; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< b0ba060d3287108eba17603bee3810e4cf2c272d; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 712bd74eccb9d3626a0a236641962eca8e11a243; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 45627a1a6450662e1e0f8174ef07b05710a20062; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 0bf463939c09e5b2c35c71ed74a5fd60a74d6a04; \>= a60be987d45dd510aeb54389526f9957cfab106c, \< 7633355e5c7f29c049a9048e461427d1d8ed3051; Linux 2.6.30.

### Is there a fix for CVE-2023-52900?

Yes. Fixed in Linux 3c2a2ff67d46106715c2132021b98bd057c27545, Linux 712bd74eccb9d3626a0a236641962eca8e11a243, Linux 45627a1a6450662e1e0f8174ef07b05710a20062, Linux 0bf463939c09e5b2c35c71ed74a5fd60a74d6a04, Linux 7633355e5c7f29c049a9048e461427d1d8ed3051. Upgrade Linux to 7633355e5c7f29c049a9048e461427d1d8ed3051 or later.

### How do I check if I'm affected by CVE-2023-52900?

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/3c2a2ff67d46106715c2132021b98bd057c27545>
- patch: <https://git.kernel.org/stable/c/d9fde9eab1766170ff2ade67d09178d2cfd78749>
- patch: <https://git.kernel.org/stable/c/b0ba060d3287108eba17603bee3810e4cf2c272d>
- patch: <https://git.kernel.org/stable/c/712bd74eccb9d3626a0a236641962eca8e11a243>
- patch: <https://git.kernel.org/stable/c/45627a1a6450662e1e0f8174ef07b05710a20062>
- patch: <https://git.kernel.org/stable/c/0bf463939c09e5b2c35c71ed74a5fd60a74d6a04>
- patch: <https://git.kernel.org/stable/c/7633355e5c7f29c049a9048e461427d1d8ed3051>

## 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-2023-52900>

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