CVE-2022-50148

kernfs: fix potential NULL dereference in __kernfs_remove

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 11:03 AM UTC
Updated: June 17, 2026 at 05:22 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: kernfs: fix potential NULL dereference in __kernfs_remove When lockdep is enabled, lockdep_assert_held_write would cause potential NULL pointer dereference. Fix the following smatch warnings: fs/kernfs/dir.c:1353 __kernfs_remove() warn: variable dereferenced before check 'kn' (see line 1346)

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.17 ≤ v < 5.18.185.17 ≤ v < 5.19.25.17 ≤ v < 6.05.19 ≤ v < 5.19.2393c3714081a53795bbff0e985d24146def6f57f5.17
Vendor states this is fixed in 4a9f35b8729c5bf13ea671c908c17ed74c48fc50 (fixed)
Vendor states this is fixed in 72b5d5aef246a0387cefa23121dd90901c7a691a (fixed)
Vendor states this is fixed in b871986d9d3071f5082664ac274d93f08db257cd (fixed)
Vendor states this is fixed in 5.17 (unaffected)
Vendor states this is fixed in 5.18.18 (unaffected)
Vendor states this is fixed in 5.19.2 (unaffected)
Vendor states this is fixed in 6.0 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4a9f35b8729c5bf13ea671c908c17ed74c48fc50
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/72b5d5aef246a0387cefa23121dd90901c7a691a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b871986d9d3071f5082664ac274d93f08db257cd

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card