Linux
proc: protect ptrace_may_access() with exec_update_lock (FD links)
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().
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 6253dfee5afba536bb54fc6fe6c091c3758fafe1
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 65bf0d2b6e914f1448d6a2fde193dcf60936a651
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < de497d7aa2fae453a7e7c8f7d3e8682e565e3aaf
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 138c692d2b2d63d26f2eb957d0e4fcc5d61f9ff2
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 83b17872e3166c295c599279fc9562ac3840c638
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 497c6bae5167428596575f20af6613ff5671f383
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < dfd1894cb64cbd8758b461ed713800fe73db4f82
- >= 778c1144771f0064b6f51bee865cceb0d996f2f9, < 6255da28d4bb5349fe18e84cb043ccd394eba75d
Fixed in 6253dfee5afba536bb54fc6fe6c091c3758fafe1, 65bf0d2b6e914f1448d6a2fde193dcf60936a651, de497d7aa2fae453a7e7c8f7d3e8682e565e3aaf, 138c692d2b2d63d26f2eb957d0e4fcc5d61f9ff2, 83b17872e3166c295c599279fc9562ac3840c638, 497c6bae5167428596575f20af6613ff5671f383, dfd1894cb64cbd8758b461ed713800fe73db4f82, 6255da28d4bb5349fe18e84cb043ccd394eba75d
- 2.6.18
Fixed in 0, 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.4, 7.2
Mitigation
Upgrade Linux to 6253dfee5afba536bb54fc6fe6c091c3758fafe1 or 65bf0d2b6e914f1448d6a2fde193dcf60936a651 or de497d7aa2fae453a7e7c8f7d3e8682e565e3aaf or 138c692d2b2d63d26f2eb957d0e4fcc5d61f9ff2 or 83b17872e3166c295c599279fc9562ac3840c638 or 497c6bae5167428596575f20af6613ff5671f383 or dfd1894cb64cbd8758b461ed713800fe73db4f82 or 6255da28d4bb5349fe18e84cb043ccd394eba75d or later.
Upgrade Linux to 0 or 5.10.261 or 5.15.212 or 6.1.178 or 6.6.145 or 6.12.97 or 6.18.40 or 7.1.4 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.