# CVE-2024-46781: nilfs2: fix missing cleanup on rollforward recovery error

> 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.37% (percentile 23, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-09-18T07:12:37.603Z
- **Modified:** 2026-08-05T11:38:32.082Z

## Who should check

- Anyone running Linux \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 35a9a7a7d94662146396199b0cfd95f9517cdd14; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< da02f9eb333333b2e4f25d2a14967cff785ac82e; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 07e4dc2fe000ab008bcfe90be4324ef56b5b4355; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 8e2d1e9d93c4ec51354229361ac3373058529ec4; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< ca92c4bff2833cb30d493b935168d6cccd5c805d; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 9d8c3a585d564d776ee60d4aabec59b404be7403; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 1cf1f7e8cd47244fa947d357ef1f642d91e219a3; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 5787fcaab9eb5930f5378d6a1dd03d916d146622
- Anyone running Linux 2.6.30

## Description

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

nilfs2: fix missing cleanup on rollforward recovery error

In an error injection test of a routine for mount-time recovery, KASAN
found a use-after-free bug.

It turned out that if data recovery was performed using partial logs
created by dsync writes, but an error occurred before starting the log
writer to create a recovered checkpoint, the inodes whose data had been
recovered were left in the ns\_dirty\_files list of the nilfs object and
were not freed.

Fix this issue by cleaning up inodes that have read the recovery data if
the recovery routine fails midway before the log writer starts.

## Affected and fixed versions

- Linux: \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 35a9a7a7d94662146396199b0cfd95f9517cdd14; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< da02f9eb333333b2e4f25d2a14967cff785ac82e; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 07e4dc2fe000ab008bcfe90be4324ef56b5b4355; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 8e2d1e9d93c4ec51354229361ac3373058529ec4; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< ca92c4bff2833cb30d493b935168d6cccd5c805d; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 9d8c3a585d564d776ee60d4aabec59b404be7403; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 1cf1f7e8cd47244fa947d357ef1f642d91e219a3; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 5787fcaab9eb5930f5378d6a1dd03d916d146622 (cvelist)
- Linux: 2.6.30 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2024-46781.md
Affected: Linux >= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, < 35a9a7a7d94662146396199b0cfd95f9517cdd14; >= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, < da02f9eb333333b2e4f25d2a14967cff785ac82e; >= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, < 07e4dc2fe000ab008bcfe90be4324ef56b5b4355; >= 0f3e1c7f23f8a6f8224fa1d…
Fixed in: Linux 35a9a7a7d94662146396199b0cfd95f9517cdd14, Linux 07e4dc2fe000ab008bcfe90be4324ef56b5b4355, Linux 8e2d1e9d93c4ec51354229361ac3373058529ec4, Linux 9d8c3a585d564d776ee60d4aabec59b404be7403, Linux 1cf1f7e8cd47244fa947d357ef1f642d91e219a3, Linux 5787fcaab9eb5930f5378d6a1dd03d916d146622

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

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

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

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

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

Linux \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 35a9a7a7d94662146396199b0cfd95f9517cdd14; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< da02f9eb333333b2e4f25d2a14967cff785ac82e; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 07e4dc2fe000ab008bcfe90be4324ef56b5b4355; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 8e2d1e9d93c4ec51354229361ac3373058529ec4; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< ca92c4bff2833cb30d493b935168d6cccd5c805d; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 9d8c3a585d564d776ee60d4aabec59b404be7403; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 1cf1f7e8cd47244fa947d357ef1f642d91e219a3; \>= 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b, \< 5787fcaab9eb5930f5378d6a1dd03d916d146622; Linux 2.6.30.

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

Yes. Fixed in Linux 35a9a7a7d94662146396199b0cfd95f9517cdd14, Linux 07e4dc2fe000ab008bcfe90be4324ef56b5b4355, Linux 8e2d1e9d93c4ec51354229361ac3373058529ec4, Linux 9d8c3a585d564d776ee60d4aabec59b404be7403, Linux 1cf1f7e8cd47244fa947d357ef1f642d91e219a3, Linux 5787fcaab9eb5930f5378d6a1dd03d916d146622. Upgrade Linux to 5787fcaab9eb5930f5378d6a1dd03d916d146622 or later.

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

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/35a9a7a7d94662146396199b0cfd95f9517cdd14>
- patch: <https://git.kernel.org/stable/c/da02f9eb333333b2e4f25d2a14967cff785ac82e>
- patch: <https://git.kernel.org/stable/c/07e4dc2fe000ab008bcfe90be4324ef56b5b4355>
- patch: <https://git.kernel.org/stable/c/8e2d1e9d93c4ec51354229361ac3373058529ec4>
- patch: <https://git.kernel.org/stable/c/ca92c4bff2833cb30d493b935168d6cccd5c805d>
- patch: <https://git.kernel.org/stable/c/9d8c3a585d564d776ee60d4aabec59b404be7403>
- patch: <https://git.kernel.org/stable/c/1cf1f7e8cd47244fa947d357ef1f642d91e219a3>
- patch: <https://git.kernel.org/stable/c/5787fcaab9eb5930f5378d6a1dd03d916d146622>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.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-46781>

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