9p: avoid putting oldfid in p9_client_walk() error path
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.1.177, 6.6.144, 6.12.95, 6.18.38, 7.1.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: 9p: avoid putting oldfid in p9_client_walk() error path When p9_client_walk() is called with clone set to false, fid aliases oldfid. If the walk subsequently fails after the request has been sent, the error path jumps to clunk_fid, which currently calls p9_fid_put(fid) unconditionally. This drops a reference to oldfid even though ownership of oldfid remains with the caller. If this is the last reference, oldfid can be clunked and destroyed while the caller still expects it to be valid. A later use or put of oldfid can then trigger a use-after-free or refcount underflow. Fix this by only putting fid in the clunk_fid error path when it does not alias oldfid, matching the existing guard in the error path below. This can be triggered when a multi-component walk is split into multiple p9_client_walk() calls and a later non-cloning walk fails. A reproducer and refcount warning logs are available on request.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in 99c379ca1e221c3d75c7c804ebbf4e5ee37a3070; From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in b84f46179c806450b89821221ea5bd9a1698aba8; From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in a61bdcba4f64c2f90d01461913f429ab151f1ca6; From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in 6dbe9443d9f5f7fb6d319a7b77108853ae6c6bea; From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in a7656d368265d085ac9bb85ab31b0cdb72ad8c38; From b48dbb998d70b7f48c2ec0a15c3cf47136808e4e · fixed in 1a3860d46e3eb47dbd60339783cdad7904486b9f
- Linux Linux
6.0
- KernelLinux
From 6.0.0 · fixed in 6.1.177; From 6.2.0 · fixed in 6.6.144; From 6.7.0 · fixed in 6.12.95; From 6.13.0 · fixed in 6.18.38; From 6.19.0 · fixed in 7.1.3