9p: fix caches_show() out-of-bounds write
- CVE-2026-142881
- GHSA-p9xv-24v5-75c2
- EUVD-2026-142137
Description
In the Linux kernel, the following vulnerability has been resolved: 9p: fix caches_show() out-of-bounds write The sysfs show handler for /sys/fs/9p/caches appends cache tags with snprintf(buf + count, limit, ...) and then advances count and limit by the return value. This is incorrect for truncation because snprintf() returns the full would-have-been length, not the number of bytes stored. Once the accumulated output exceeds PAGE_SIZE, count can advance past the sysfs buffer and limit can become negative. A later iteration then passes an out-of-bounds destination pointer and an oversized size_t into snprintf(), leading to an out-of-bounds write. Use sysfs_emit_at() for the append instead. It follows the sysfs buffer contract and returns the number of bytes actually stored, so the offset remains bounded even when the output is truncated.
Text from the CVE.org record.
Recommendation
Linux
- If you run 6.12.xupdate to 6.12.118 or laterPatch update: breaking changes are unlikely
- If you run 6.6.xupdate to 6.6.163 or laterPatch update: breaking changes are unlikely
- If you run 6.1.xupdate to 6.1.193 or laterPatch update: breaking changes are unlikely
- If you run 5.15.xupdate to 5.15.226 or laterPatch update: breaking changes are unlikely
- If you run 5.10.xupdate to 5.10.275 or laterPatch update: breaking changes are unlikely
- If you run a version from 5.4.302 to before 5.5update to 5.5 or laterMinor version change: check the release notes
Some affected versions have no stated fix.
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Linux
Affected versions Fixed in from 6.12.58 to before 6.12.118 6.12.118 from 6.6.117 to before 6.6.163 6.6.163 from 6.1.159 to before 6.1.193 6.1.193 from 5.15.197 to before 5.15.226 5.15.226 from 5.10.247 to before 5.10.275 5.10.275 from 5.4.302 to before 5.5 5.5 from 6.17.8 to before 6.18 none stated 6.18 none stated and 9 more
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.