CVE-2022-50266

kprobes: Fix check for probe enabled in kill_kprobe()

State
Published
Severity
Not scored
Published
Sep 15, 2025
Updated
May 23, 2026
Reserved
Sep 15, 2025

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

kprobes: Fix check for probe enabled in kill_kprobe()

In kill_kprobe(), the check whether disarm_kprobe_ftrace() needs to be called always fails. This is because before that we set the KPROBE_FLAG_GONE flag for kprobe so that "!kprobe_disabled(p)" is always false.

The disarm_kprobe_ftrace() call introduced by commit:

0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler")

to fix the NULL pointer reference problem. When the probe is enabled, if we do not disarm it, this problem still exists.

Fix it by putting the probe enabled check before setting the KPROBE_FLAG_GONE flag.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 3031313eb3d549b7ad6f9fbcc52ba04412e3eb9e to before f20a067f13106565816b4b6a6b665b2088a63824Affected
  • 3031313eb3d549b7ad6f9fbcc52ba04412e3eb9e to before c909985dd0c0f74b61e3f8f0e04bf8aa9c8b97c7Affected
  • 3031313eb3d549b7ad6f9fbcc52ba04412e3eb9e to before 0c76ef3f26d5ef2ac2c21b47e7620cff35809fbbAffected
  • 3c5f8d371b7fef3e3714c4a062c7f3b4aa41d122Affected
  • 9b55d84deec88c02b053a819acf08a6d471dda02Affected
  • 2295608b44c91df767a5c68027f9c9e52ecb28e7Affected
  • ce7ff920092130f249b75f9fe177edb3362fefe8Affected
  • 3995f7a60feceba6c8f762f4aff3184f90a1291dAffected
  • 247c62ebdfae450bb76dd89cd4724df6be07df75Affected
  • 4.4.238 to before 4.5Affected
  • 4.9.238 to before 4.10Affected
  • 4.14.200 to before 4.15Affected
  • 4.19.149 to before 4.20Affected
  • 5.4.69 to before 5.5Affected
  • 5.8.13 to before 5.9Affected
LinuxLinux
  • 5.9Affected
  • before 5.9Not affected
  • 6.0.16 through 6.0.*Not affected
  • 6.1.2 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.