{"id":"CVE-2022-50046","aliases":["CVE-2022-50046"],"related":[],"kind":"vulnerability","state":"published","title":"net/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change()\n\nThe issue happens on some error handling paths. When the function\nfails to grab the object `xprt`, it simply returns 0, forgetting to\ndecrease the reference count of another object `xps`, which is\nincreased by rpc_sysfs_xprt_kobj_get_xprt_switch(), causing refcount\nleaks. Also, the function forgets to check whether `xps` is valid\nbefore using it, which may result in NULL-dereferencing issues.\n\nFix it by adding proper error handling code when either `xprt` or\n`xps` is NULL.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/sunrpc: fix potential memory leaks in rpc_sysfs_xprt_state_change()\n\nThe issue happens on some error handling paths. When the function\nfails to grab the object `xprt`, it simply returns 0, forgetting to\ndecrease the reference count of another object `xps`, which is\nincreased by rpc_sysfs_xprt_kobj_get_xprt_switch(), causing refcount\nleaks. Also, the function forgets to check whether `xps` is valid\nbefore using it, which may result in NULL-dereferencing issues.\n\nFix it by adding proper error handling code when either `xprt` or\n`xps` is NULL.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net/sunrpc: se corrigen posibles fugas de memoria en rpc_sysfs_xprt_state_change(). El problema se produce en algunas rutas de gestión de errores. Cuando la función no logra capturar el objeto `xprt`, simplemente devuelve 0, olvidando disminuir el recuento de referencias de otro objeto `xps`, que se incrementa mediante rpc_sysfs_xprt_kobj_get_xprt_switch(), lo que provoca fugas de referencias. Además, la función olvida comprobar si `xps` es válido antes de usarlo, lo que puede provocar problemas de desreferenciación a valores NULL. Se puede solucionar añadiendo el código de gestión de errores adecuado cuando `xprt` o `xps` sean valores NULL.","source":"nvd"}],"published":"2025-06-18T11:01:47.155Z","modified":"2026-06-17T05:22:38.057Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b","fixed":"c0434f0e058648649250b8ed6078b66d773de723","status":"affected"},{"type":"git","introduced":"5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b","fixed":"76fbeb1662b1c56514325118a07fba74dc4c79fe","status":"affected"},{"type":"git","introduced":"5b7eb78486cd9ac58bfbd6d84ea0fe2d9fead03b","fixed":"bfc48f1b0505ffcb03a6d749139b7577d6b81ae0","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.63","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.19.4","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.63"},{"status":"affected","introduced":"5.16","fixed":"5.19.4"},{"status":"affected","version":"6.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/c0434f0e058648649250b8ed6078b66d773de723","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/76fbeb1662b1c56514325118a07fba74dc4c79fe","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bfc48f1b0505ffcb03a6d749139b7577d6b81ae0","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50046","url":"https://www.cve.org/CVERecord?id=CVE-2022-50046","licence":"CVE Terms of Use","modified":"2026-05-11T19:11:48.153Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50046","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50046","licence":"Public domain","modified":"2026-06-17T05:22:38.057Z"}],"updatedAt":"2026-11-25T22:58:21.027Z","epss":{"score":0.00275,"percentile":0.12616,"date":"2026-11-30T12:00:22.000Z"}}