CVE-2026-97606: fs: autofs: fix memory leak in autofs_fill_super()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
fs: autofs: fix memory leak in autofs_fill_super()
In autofs_fill_super(), we create a new inode using autofs_new_ino(), however, if we fail to create root_inode, (that is, root_inode failure path), we return -ENOMEM without freeing the new inode(ino) that we created causing a memory leak. Fix this by adding autofs_free_ino() to free the inode we created in root_inode failure path before returning ENOMEM.
The Linux kernel CVE team has assigned CVE-2026-97606 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.7 with commit 66917f85db6002ed09cd24186258892fcfca64b6 and fixed in 6.12.111 with commit 4262b91e08e74cb5209ea737c554cf983d332382 Issue introduced in 6.7 with commit 66917f85db6002ed09cd24186258892fcfca64b6 and fixed in 6.18.53 with commit 9933ad1c4ff67680cd59c47f6d2e81b533bcd467 Issue introduced in 6.7 with commit 66917f85db6002ed09cd24186258892fcfca64b6 and fixed in 7.2.7 with commit 6259b5d9bdc45fdb3158406b28c27fa074823159 Issue introduced in 6.7 with commit 66917f85db6002ed09cd24186258892fcfca64b6 and fixed in 7.3-rc3 with commit 5ab54837fce04a1c9923d0bfd3d5de51fdc768b3
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-97606
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/autofs/inode.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/4262b91e08e74cb5209ea737c554cf983d332382 https://git.kernel.org/stable/c/9933ad1c4ff67680cd59c47f6d2e81b533bcd467 https://git.kernel.org/stable/c/6259b5d9bdc45fdb3158406b28c27fa074823159 https://git.kernel.org/stable/c/5ab54837fce04a1c9923d0bfd3d5de51fdc768b3