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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-09-18T07:12:37.603Z
- Modified: 2026-08-05T11:38:32.082Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 35a9a7a7d94662146396199b0cfd95f9517cdd14; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before da02f9eb333333b2e4f25d2a14967cff785ac82e; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 07e4dc2fe000ab008bcfe90be4324ef56b5b4355; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 8e2d1e9d93c4ec51354229361ac3373058529ec4; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before ca92c4bff2833cb30d493b935168d6cccd5c805d; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 9d8c3a585d564d776ee60d4aabec59b404be7403; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 1cf1f7e8cd47244fa947d357ef1f642d91e219a3; from 0f3e1c7f23f8a6f8224fa1d275381f6d9279ad4b before 5787fcaab9eb5930f5378d6a1dd03d916d146622; 2.6.30 (not affected: before 2.6.30; from 4.19.322 up to 4.19.*; from 5.4.284 up to 5.4.*; from 5.10.226 up to 5.10.*; from 5.15.167 up to 5.15.*; from 6.1.110 up to 6.1.*; from 6.6.51 up to 6.6.*; from 6.10.10 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 2.6.30 before 4.19.322; from 4.20 before 5.4.284; from 5.5 before 5.10.226; from 5.11 before 5.15.167; from 5.16 before 6.1.110; from 6.2 before 6.6.51; from 6.7 before 6.10.10; 6.11

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Sources

- CVE List: [CVE-2024-46781](https://www.cve.org/CVERecord?id=CVE-2024-46781), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-46781](https://nvd.nist.gov/vuln/detail/CVE-2024-46781), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-46781 · Whole record: https://cve.day/CVE-2024-46781.json · Rebuilt by cve.day 2026-11-25T22:58:45.571Z
