{"id":"CVE-2026-139510","aliases":["CVE-2026-139510"],"related":[],"kind":"vulnerability","state":"published","title":"nilfs2: fix link count underflow when removing corrupted directory","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix link count underflow when removing corrupted directory\n\nWhen removing an empty directory with a corrupted link count (e.g.,\ni_nlink is 1 due to filesystem corruption), nilfs_rmdir() calls\ndrop_nlink() via nilfs_do_unlink() and then calls drop_nlink() again\non the directory inode.  This second call causes an underflow of\ni_nlink, triggering a kernel WARNING in drop_nlink().\n\nFix this issue by using clear_nlink() instead of drop_nlink() to\nfinalize the link count reset for the target directory in nilfs_rmdir().\nAdditionally, log a warning message when i_nlink is not 2 before\nremoving an empty directory to notify about the link count inconsistency.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix link count underflow when removing corrupted directory\n\nWhen removing an empty directory with a corrupted link count (e.g.,\ni_nlink is 1 due to filesystem corruption), nilfs_rmdir() calls\ndrop_nlink() via nilfs_do_unlink() and then calls drop_nlink() again\non the directory inode.  This second call causes an underflow of\ni_nlink, triggering a kernel WARNING in drop_nlink().\n\nFix this issue by using clear_nlink() instead of drop_nlink() to\nfinalize the link count reset for the target directory in nilfs_rmdir().\nAdditionally, log a warning message when i_nlink is not 2 before\nremoving an empty directory to notify about the link count inconsistency.","source":"cvelist"}],"published":"2026-11-30T13:35:25.120Z","modified":"2026-11-30T14:19:26.930Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"719e0bfa146c6dded44f10a9c1c53890b658cfe2","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"6f7a95bd8c5a702737740feb8f1b50d1c4ea1062","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"6665347d26bf851df6793f4f3f9a7cc72a636917","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"5f391ea18c845d2989e6c63de7a9585271f23566","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"1224daa73cc19b6b9bc9f241af30bc9998063a3e","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"e6f6d475f5d8750bea7e8ab4e945654bc92283bd","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"1cd9c49962aa6b977b0f8e90b626a47534e8ec0d","status":"affected"},{"type":"git","introduced":"d25006523d0b9e49fd097b2e974e7c8c05bd7f54","fixed":"814f5a53b4724798795b15690ff3d1c1d9ac1eb6","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.30","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.30","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/719e0bfa146c6dded44f10a9c1c53890b658cfe2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6f7a95bd8c5a702737740feb8f1b50d1c4ea1062","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6665347d26bf851df6793f4f3f9a7cc72a636917","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5f391ea18c845d2989e6c63de7a9585271f23566","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1224daa73cc19b6b9bc9f241af30bc9998063a3e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e6f6d475f5d8750bea7e8ab4e945654bc92283bd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1cd9c49962aa6b977b0f8e90b626a47534e8ec0d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/814f5a53b4724798795b15690ff3d1c1d9ac1eb6","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139510","url":"https://www.cve.org/CVERecord?id=CVE-2026-139510","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:25.120Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139510","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139510","licence":"Public domain","modified":"2026-11-30T14:19:26.930Z"}],"updatedAt":"2026-11-30T14:33:26.840Z","epss":{"score":0.00211,"percentile":0.12006,"date":"2026-12-01T12:00:22.000Z"}}