# CVE-2023-53440: nilfs2: fix sysfs interface lifetime

> 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-09-18T16:04:17.845Z
- **Modified:** 2026-08-05T09:14:08.186Z

## Who should check

- Anyone running Linux \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d20dcec8f326deb77b6688f8441e014045dac457; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 5fe0ea141fbb887d407f1bf572ebf24427480d5c; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 83b16a60e413148685739635901937e2f16a7873; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d540aea451ab5489777a8156560f1388449b3109; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 1942ccb7d95f287a312fcbabfa8bc9ba501b1953; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< daf4eb3a908b108279b60172d2f176e70d2df875; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 42560f9c92cc43dce75dbf06cc0d840dced39b12
- Anyone running Linux 3.17

## Description

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

nilfs2: fix sysfs interface lifetime

The current nilfs2 sysfs support has issues with the timing of creation
and deletion of sysfs entries, potentially leading to null pointer
dereferences, use-after-free, and lockdep warnings.

Some of the sysfs attributes for nilfs2 per-filesystem instance refer to
metadata file "cpfile", "sufile", or "dat", but
nilfs\_sysfs\_create\_device\_group that creates those attributes is executed
before the inodes for these metadata files are loaded, and
nilfs\_sysfs\_delete\_device\_group which deletes these sysfs entries is
called after releasing their metadata file inodes.

Therefore, access to some of these sysfs attributes may occur outside of
the lifetime of these metadata files, resulting in inode NULL pointer
dereferences or use-after-free.

In addition, the call to nilfs\_sysfs\_create\_device\_group() is made during
the locking period of the semaphore "ns\_sem" of nilfs object, so the
shrinker call caused by the memory allocation for the sysfs entries, may
derive lock dependencies "ns\_sem" -\> (shrinker) -\> "locks acquired in
nilfs\_evict\_inode()".

Since nilfs2 may acquire "ns\_sem" deep in the call stack holding other
locks via its error handler \_\_nilfs\_error(), this causes lockdep to report
circular locking.  This is a false positive and no circular locking
actually occurs as no inodes exist yet when
nilfs\_sysfs\_create\_device\_group() is called.  Fortunately, the lockdep
warnings can be resolved by simply moving the call to
nilfs\_sysfs\_create\_device\_group() out of "ns\_sem".

This fixes these sysfs issues by revising where the device's sysfs
interface is created/deleted and keeping its lifetime within the lifetime
of the metadata files above.

## Affected and fixed versions

- Linux: \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d20dcec8f326deb77b6688f8441e014045dac457; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 5fe0ea141fbb887d407f1bf572ebf24427480d5c; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 83b16a60e413148685739635901937e2f16a7873; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d540aea451ab5489777a8156560f1388449b3109; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 1942ccb7d95f287a312fcbabfa8bc9ba501b1953; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< daf4eb3a908b108279b60172d2f176e70d2df875; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 42560f9c92cc43dce75dbf06cc0d840dced39b12 (cvelist)
- Linux: 3.17 (cvelist)

## Mitigation

- Upgrade Linux to 42560f9c92cc43dce75dbf06cc0d840dced39b12 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-53440. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53440.md
Affected: Linux >= dd70edbde2627f47df118d899de6bbb55abcfdbf, < d20dcec8f326deb77b6688f8441e014045dac457; >= dd70edbde2627f47df118d899de6bbb55abcfdbf, < 5fe0ea141fbb887d407f1bf572ebf24427480d5c; >= dd70edbde2627f47df118d899de6bbb55abcfdbf, < 83b16a60e413148685739635901937e2f16a7873; >= dd70edbde2627f47df118d8…
Fixed in: Linux 5fe0ea141fbb887d407f1bf572ebf24427480d5c, Linux 83b16a60e413148685739635901937e2f16a7873, Linux 3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24, Linux 1942ccb7d95f287a312fcbabfa8bc9ba501b1953, Linux 42560f9c92cc43dce75dbf06cc0d840dced39b12

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

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

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

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

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

Linux \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d20dcec8f326deb77b6688f8441e014045dac457; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 5fe0ea141fbb887d407f1bf572ebf24427480d5c; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 83b16a60e413148685739635901937e2f16a7873; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< d540aea451ab5489777a8156560f1388449b3109; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 1942ccb7d95f287a312fcbabfa8bc9ba501b1953; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< daf4eb3a908b108279b60172d2f176e70d2df875; \>= dd70edbde2627f47df118d899de6bbb55abcfdbf, \< 42560f9c92cc43dce75dbf06cc0d840dced39b12; Linux 3.17.

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

Yes. Fixed in Linux 5fe0ea141fbb887d407f1bf572ebf24427480d5c, Linux 83b16a60e413148685739635901937e2f16a7873, Linux 3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24, Linux 1942ccb7d95f287a312fcbabfa8bc9ba501b1953, Linux 42560f9c92cc43dce75dbf06cc0d840dced39b12. Upgrade Linux to 42560f9c92cc43dce75dbf06cc0d840dced39b12 or later.

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

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/d20dcec8f326deb77b6688f8441e014045dac457>
- patch: <https://git.kernel.org/stable/c/5fe0ea141fbb887d407f1bf572ebf24427480d5c>
- patch: <https://git.kernel.org/stable/c/83b16a60e413148685739635901937e2f16a7873>
- patch: <https://git.kernel.org/stable/c/3dbee84bf9e3273c4bb9ca6fc18ff22fba23dd24>
- patch: <https://git.kernel.org/stable/c/d540aea451ab5489777a8156560f1388449b3109>
- patch: <https://git.kernel.org/stable/c/1942ccb7d95f287a312fcbabfa8bc9ba501b1953>
- patch: <https://git.kernel.org/stable/c/daf4eb3a908b108279b60172d2f176e70d2df875>
- patch: <https://git.kernel.org/stable/c/42560f9c92cc43dce75dbf06cc0d840dced39b12>

## 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-53440>

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