Linux: kprobes: Skip disarmed probes when checking optkprobe overlap
What fixes it
- 3f968dcdf018861129f97910fa7bd680d939a9b0LinuxCVE List
- 985a568171e7bdba6dcde3420d0e5bb515813457LinuxCVE List
- 6745fa65f4115045431c0c15610e876855a04625LinuxCVE List
- 526fac219e8b7d3369b43026bd0a1df51b811cd4LinuxCVE List
- 7a39c732a22ec4a369af9e19fbe3d666ec83eec4LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
kprobes: Skip disarmed probes when checking optkprobe overlap
On x86, an optkprobe at A replaces five bytes with a jump. If a disabled probe B is at A+2, get_optimized_kprobe() stops at B when arming a new probe C at A+4. It leaves A optimized:
A A+1 A+2 A+3 A+4 A's jump | e9 | d0 | d1 | d2 | d3 | after C | e9 | d0 | d1 | d2 | cc |
The INT3 for C overwrites the last byte of A's jump displacement, so execution can jump to the wrong address. B can have prepared optinsns while disarmed, but has no jump to unoptimize.
Continue past disarmed and unprepared probes to find the active optimized probe before arming a probe in its jump.
Text from CVE List
Affected versions 12
- Linuxaffected: afd66255b9a48f5851326ddae50e2203fbf71dc9 before 3f968dcdf018861129f97910fa7bd680d939a9b0CVE List
- Linuxaffected: afd66255b9a48f5851326ddae50e2203fbf71dc9 before 985a568171e7bdba6dcde3420d0e5bb515813457CVE List
- Linuxaffected: afd66255b9a48f5851326ddae50e2203fbf71dc9 before 6745fa65f4115045431c0c15610e876855a04625CVE List
- Linuxaffected: afd66255b9a48f5851326ddae50e2203fbf71dc9 before 526fac219e8b7d3369b43026bd0a1df51b811cd4CVE List
- Linuxaffected: afd66255b9a48f5851326ddae50e2203fbf71dc9 before 7a39c732a22ec4a369af9e19fbe3d666ec83eec4CVE List
- Linuxaffected: 2.6.34CVE List
- Linuxunaffected: all versions before 2.6.34CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.113 through 6.12.*CVE List
- Linuxunaffected: 6.18.56 through 6.18.*CVE List
- Linuxunaffected: 7.2.10 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/3f968dcdf018861129f97910fa7bd680d939a9b0Referencevia CVE List
- git.kernel.org/stable/c/985a568171e7bdba6dcde3420d0e5bb515813457Referencevia CVE List
- git.kernel.org/stable/c/6745fa65f4115045431c0c15610e876855a04625Referencevia CVE List
- git.kernel.org/stable/c/526fac219e8b7d3369b43026bd0a1df51b811cd4Referencevia CVE List
- git.kernel.org/stable/c/7a39c732a22ec4a369af9e19fbe3d666ec83eec4Referencevia CVE List