CVE-2026-53174: ovl: keep err zero after successful ovl_cache_get()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ovl: keep err zero after successful ovl_cache_get()
ovl_iterate_merged() stores PTR_ERR(cache) in err before checking IS_ERR(cache). On success err holds the truncated cache pointer and can be returned as a bogus non-zero error.
The syzbot reproducer reaches this through overlay-on-overlay readdir:
getdents64
iterate_dir(outer overlay file)
ovl_iterate_merged()
ovl_cache_get()
ovl_dir_read_merged()
ovl_dir_read()
iterate_dir(inner overlay file)
ovl_iterate_merged()
Only compute PTR_ERR(cache) on the error path.
The Linux kernel CVE team has assigned CVE-2026-53174 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit d25e4b739f8378419f990983f2542160e79738c5 and fixed in 7.0.13 with commit e7051909a01bfb883bfa78b27514854068ac4b85 Issue introduced in 6.19 with commit d25e4b739f8378419f990983f2542160e79738c5 and fixed in 7.1 with commit 1711b6ed6953cee5940ca4c3a6e77f1b3798cee2
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-53174
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/overlayfs/readdir.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/e7051909a01bfb883bfa78b27514854068ac4b85 https://git.kernel.org/stable/c/1711b6ed6953cee5940ca4c3a6e77f1b3798cee2