What’s Vulnerable › Vulnerabilities
CVE-2022-50148: kernfs: fix potential NULL dereference in __kernfs_remove
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-06-18 · updated 2026-06-17
- Weakness: CWE-476
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 products
- Linux kernel: from 5.17 before 5.18.18; from 5.19 before 5.19.2 — fixed in 5.18.18, 5.19.2
How to fix
Upgrade to a fixed version: Linux kernel 5.18.18, 5.19.2. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/4a9f35b8729c5bf13ea671c908c17ed74c48fc50
- https://git.kernel.org/stable/c/72b5d5aef246a0387cefa23121dd90901c7a691a
- https://git.kernel.org/stable/c/b871986d9d3071f5082664ac274d93f08db257cd
Get alerted when CVE-2022-50148 or the next vulnerability affects your stack