nilfs2 link count underflow when removing corrupted directory in Linux kernel
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The nilfs2 filesystem in the Linux kernel, from 2.6.30 before the fixed kernel versions, can underflow the link count of a directory when removing an empty directory whose link count is corrupted. The nilfs_rmdir() function drops the link count twice, which triggers a kernel WARNING in drop_nlink(). An attacker who can trigger the removal of a corrupted directory on a crafted filesystem can cause the kernel to log this warning.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: nilfs2: fix link count underflow when removing corrupted directory When removing an empty directory with a corrupted link count (e.g., i_nlink is 1 due to filesystem corruption), nilfs_rmdir() calls drop_nlink() via nilfs_do_unlink() and then calls drop_nlink() again on the directory inode. This second call causes an underflow of i_nlink, triggering a kernel WARNING in drop_nlink(). Fix this issue by using clear_nlink() instead of drop_nlink() to finalize the link count reset for the target directory in nilfs_rmdir(). Additionally, log a warning message when i_nlink is not 2 before removing an empty directory to notify about the link count inconsistency.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 2.6.30 and later | 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1 | Patch available | CNA |
- Linux VendorLinux Affected 2.6.30 and later Fixed in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1 Patch available CNA
Remediation
Fixed versions are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6 and 7.4-rc1 for the Linux kernel. Apply the stable kernel update from your distribution or kernel branch that contains one of these versions.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139510
- 2026-11-30 Alias added: GHSA-v9hq-xwgx-q2wg
References
Other 8
- https://git.kernel.org/stable/c/719e0bfa146c6dded44f10a9c1c53890b658cfe2
- https://git.kernel.org/stable/c/6f7a95bd8c5a702737740feb8f1b50d1c4ea1062
- https://git.kernel.org/stable/c/6665347d26bf851df6793f4f3f9a7cc72a636917
- https://git.kernel.org/stable/c/5f391ea18c845d2989e6c63de7a9585271f23566
- https://git.kernel.org/stable/c/1224daa73cc19b6b9bc9f241af30bc9998063a3e
- https://git.kernel.org/stable/c/e6f6d475f5d8750bea7e8ab4e945654bc92283bd
- https://git.kernel.org/stable/c/1cd9c49962aa6b977b0f8e90b626a47534e8ec0d
- https://git.kernel.org/stable/c/814f5a53b4724798795b15690ff3d1c1d9ac1eb6
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-139510 · CVE Program
- CVE-2026-139510 · NVD
- GHSA-v9hq-xwgx-q2wg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences