# CVE-2026-31577: nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-04-24T14:42:08.879Z
- Modified: 2026-11-11T23:10:00.263Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map

The DAT inode's btree node cache (i_assoc_inode) is initialized lazily
during btree operations. However, nilfs_mdt_save_to_shadow_map()
assumes i_assoc_inode is already initialized when copying dirty pages
to the shadow map during GC.

If NILFS_IOCTL_CLEAN_SEGMENTS is called immediately after mount before
any btree operation has occurred on the DAT inode, i_assoc_inode is
NULL leading to a general protection fault.

Fix this by calling nilfs_attach_btree_node_cache() on the DAT inode
in nilfs_dat_read() at mount time, ensuring i_assoc_inode is always
initialized before any GC operation can use it.

(As written by CVE List.)

## Affected

- Linux Linux: from d626fcdabea2258be395a775bdbe09270e9bf73d before 6637bbcfb59df5b732a79e5ab1a74886a0b93d59; from d05cc5395e36711edad8bdef6945f138d8a7097b before 837c7a59fb58f81b0db33848357f6a5d0d1250ad; from e897be17a441fa637cd166fc3de1445131e57692 before 7902b1df1520a0880bcda7a3704cfacd17905a83; from e897be17a441fa637cd166fc3de1445131e57692 before 7318e3549518ce8f14776a489d86488d80d7e2c8; from e897be17a441fa637cd166fc3de1445131e57692 before 449ec5fc99f45974525ba9eea16b6670c45cd363; from e897be17a441fa637cd166fc3de1445131e57692 before c36e206f302f1ddefed92d09ecbba070e1ae079e; from e897be17a441fa637cd166fc3de1445131e57692 before 41de342278ae025c99cc8d33648773f05e306cf1; from e897be17a441fa637cd166fc3de1445131e57692 before 97fb7afec404912d967a7d4715f37742666b3084; from e897be17a441fa637cd166fc3de1445131e57692 before 4a4e0328edd9e9755843787d28f16dd4165f8b48; 6c3da8c0a35bbafe359d9166269d5590f29664de; 605babb979c213737618b1c837e89624e5ab11fd; 307d021b1a7f33048b624f7aaeaa75e3eae571f1; and 8 more (not affected: before 5.18; from 5.10.258 up to 5.10.*; from 5.15.209 up to 5.15.*; from 6.1.175 up to 6.1.*; from 6.6.136 up to 6.6.*; from 6.12.83 up to 6.12.*; from 6.18.24 up to 6.18.*; from 6.19.14 up to 6.19.*; from 7.0.1 up to 7.0.*; from 7.1 up to *)
- linux linux_kernel: before 6.6.136; from 6.7 before 6.12.83; from 6.13 before 6.18.24; from 6.19 before 6.19.14; from 7.0 before 7.0.1

## References

- <https://git.kernel.org/stable/c/6637bbcfb59df5b732a79e5ab1a74886a0b93d59>
- <https://git.kernel.org/stable/c/837c7a59fb58f81b0db33848357f6a5d0d1250ad>
- <https://git.kernel.org/stable/c/7902b1df1520a0880bcda7a3704cfacd17905a83>
- <https://git.kernel.org/stable/c/7318e3549518ce8f14776a489d86488d80d7e2c8> (patch)
- <https://git.kernel.org/stable/c/449ec5fc99f45974525ba9eea16b6670c45cd363> (patch)
- <https://git.kernel.org/stable/c/c36e206f302f1ddefed92d09ecbba070e1ae079e> (patch)
- <https://git.kernel.org/stable/c/41de342278ae025c99cc8d33648773f05e306cf1> (patch)
- <https://git.kernel.org/stable/c/97fb7afec404912d967a7d4715f37742666b3084> (patch)
- <https://git.kernel.org/stable/c/4a4e0328edd9e9755843787d28f16dd4165f8b48> (patch)

## Sources

- CVE List: [CVE-2026-31577](https://www.cve.org/CVERecord?id=CVE-2026-31577), CVE Terms of Use, modified 2026-06-14
- NVD: [CVE-2026-31577](https://nvd.nist.gov/vuln/detail/CVE-2026-31577), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-31577 · Whole record: https://cve.day/CVE-2026-31577.json · Rebuilt by cve.day 2026-11-25T22:59:19.492Z
