CVE-2026-31577 PUBLISHED

nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map

Assigner: Linux
Reserved: 09.03.2026 Published: 24.04.2026 Updated: 24.04.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 449ec5fc99f45974525ba9eea16b6670c45cd363 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to c36e206f302f1ddefed92d09ecbba070e1ae079e (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 41de342278ae025c99cc8d33648773f05e306cf1 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 97fb7afec404912d967a7d4715f37742666b3084 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • unaffected from 6.12.83 to 6.12.* (incl.)
  • unaffected from 6.18.24 to 6.18.* (incl.)
  • unaffected from 6.19.14 to 6.19.* (incl.)
  • unaffected from 7.0.1 to 7.0.* (incl.)

References