proc: protect ptrace_may_access() with exec_update_lock (FD links)
- 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 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, and 2 more
- 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: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: proc: protect ptrace_may_access() with exec_update_lock (FD links) proc_pid_get_link() and proc_pid_readlink() currently look up the task from the pid once, then do the ptrace access check on that task, then look up the task from the pid a second time to do the actual access. That's racy in several ways. To fix it, pass the task to the ->proc_get_link() handler, and instead of proc_fd_access_allowed(), introduce a new helper call_proc_get_link() that looks up and locks the task, does the access check, and calls ->proc_get_link().
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 6253dfee5afba536bb54fc6fe6c091c3758fafe1; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 65bf0d2b6e914f1448d6a2fde193dcf60936a651; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in de497d7aa2fae453a7e7c8f7d3e8682e565e3aaf; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 138c692d2b2d63d26f2eb957d0e4fcc5d61f9ff2; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 83b17872e3166c295c599279fc9562ac3840c638; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 497c6bae5167428596575f20af6613ff5671f383; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in dfd1894cb64cbd8758b461ed713800fe73db4f82; From 778c1144771f0064b6f51bee865cceb0d996f2f9 · fixed in 6255da28d4bb5349fe18e84cb043ccd394eba75d
- Linux Linux
2.6.18
- KernelLinux
From 2.6.18 · fixed in 5.10.261; From 5.11.0 · fixed in 5.15.212; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.4
References 8
git.kernel.org
- stable/c/6253dfee5afba536bb54fc6fe6c091c3758fafe1
- stable/c/65bf0d2b6e914f1448d6a2fde193dcf60936a651
- stable/c/de497d7aa2fae453a7e7c8f7d3e8682e565e3aaf
- stable/c/138c692d2b2d63d26f2eb957d0e4fcc5d61f9ff2
- stable/c/83b17872e3166c295c599279fc9562ac3840c638
- stable/c/497c6bae5167428596575f20af6613ff5671f383
- stable/c/dfd1894cb64cbd8758b461ed713800fe73db4f82
- stable/c/6255da28d4bb5349fe18e84cb043ccd394eba75d