{"id":"CVE-2022-50043","summary":"net: fix potential refcount leak in ndisc_router_discovery()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: fix potential refcount leak in ndisc_router_discovery()\n\nThe issue happens on specific paths in the function. After both the\nobject `rt` and `neigh` are grabbed successfully, when `lifetime` is\nnonzero but the metric needs change, the function just deletes the\nroute and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh`\nagain if above conditions hold. The function simply overwrite `neigh`\nif succeeds or returns if fails, without decreasing the reference\ncount of previous `neigh`. This may result in memory leaks.\n\nFix it by decrementing the reference count of `neigh` in place.","modified":"2026-08-12T03:51:45.571646682Z","published":"2025-06-18T11:01:44.186Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50043.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/7396ba87f1edf549284869451665c7c4e74ecd4f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7998043d31d000c3a93f46182e6569dd0eecda34"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ffb15594433391fd7885eb88ce5a7f7bdeefbb15"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50043.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50043"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6b2e04bc240fe9be9e690059f710e9f95346d34d"},{"fixed":"ffb15594433391fd7885eb88ce5a7f7bdeefbb15"},{"fixed":"7998043d31d000c3a93f46182e6569dd0eecda34"},{"fixed":"7396ba87f1edf549284869451665c7c4e74ecd4f"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50043.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.12.0"},{"fixed":"5.15.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.19.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50043.json"}}],"schema_version":"1.9.0"}