CVE-2022-50046 Details
Description
In the Linux kernel, the following vulnerability has been resolved: net/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change() The issue happens on some error handling paths. When the function fails to grab the object `xprt`, it simply returns 0, forgetting to decrease the reference count of another object `xps`, which is increased by rpc_sysfs_xprt_kobj_get_xprt_switch(), causing refcount leaks. Also, the function forgets to check whether `xps` is valid before using it, which may result in NULL-dereferencing issues. Fix it by adding proper error handling code when either `xprt` or `xps` is NULL.
A vulnerability in the Linux kernel's SunRPC module could lead to memory leaks. The issue arises in the `rpc_sysfs_xprt_state_change()` function, where error handling paths may cause reference count leaks. Specifically, when the function fails to retrieve the `xprt` object, it returns 0 without decreasing the reference count of the `xps` object, which can lead to memory being improperly released. Additionally, the function does not validate the `xps` object before use, potentially causing NULL dereference errors. The vulnerability has been addressed by improving error handling to check for NULL values in `xprt` and `xps`.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/76fbeb1662b1c56514325118a07fba74dc4c79fe | kernel.org | Patch |
| https://git.kernel.org/stable/c/bfc48f1b0505ffcb03a6d749139b7577d6b81ae0 | kernel.org | Patch |
| https://git.kernel.org/stable/c/c0434f0e058648649250b8ed6078b66d773de723 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-401 | Missing Release of Memory after Effective Lifetime | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.14, < 5.15.63 >= 5.16, < 5.19.4 6.0 rc1 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 13, 2025 | Initial Analysis | [email protected] |
| Jun 18, 2025 | New CVE Received | kernel.org |