CVE-2022-50046

net/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change()

State
Published
Severity
Not scored
Published
Jun 18, 2025
Updated
May 11, 2026
Reserved
Jun 18, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b to before c0434f0e058648649250b8ed6078b66d773de723Affected
  • 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b to before 76fbeb1662b1c56514325118a07fba74dc4c79feAffected
  • 5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b to before bfc48f1b0505ffcb03a6d749139b7577d6b81ae0Affected
LinuxLinux
  • 5.14Affected
  • before 5.14Not affected
  • 5.15.63 through 5.15.*Not affected
  • 5.19.4 through 5.19.*Not affected
  • 6.0 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.