Bug 2373511 (CVE-2022-50046) - CVE-2022-50046 kernel: net/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change()
Summary: CVE-2022-50046 kernel: net/sunrpc: fix potential memory leaks in rpc_sysfs_xp...
Keywords:
Status: NEW
Alias: CVE-2022-50046
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 12:06 UTC by OSIDB Bzimport
Modified: 2025-08-05 13:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 12:06:14 UTC
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.

Comment 1 Avinash Hanwate 2025-06-19 19:58:13 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061844-CVE-2022-50046-9cac@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.