# CVE-2022-50043: net: fix potential refcount leak in ndisc_router_discovery()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-06-18T11:01:44.186Z
- Modified: 2026-11-05T20:17:21.393Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: fix potential refcount leak in ndisc_router_discovery()

The issue happens on specific paths in the function. After both the
object `rt` and `neigh` are grabbed successfully, when `lifetime` is
nonzero but the metric needs change, the function just deletes the
route and set `rt` to NULL. Then, it may try grabbing `rt` and `neigh`
again if above conditions hold. The function simply overwrite `neigh`
if succeeds or returns if fails, without decreasing the reference
count of previous `neigh`. This may result in memory leaks.

Fix it by decrementing the reference count of `neigh` in place.

(As written by CVE List.)

## Affected

- Linux Linux: from 6b2e04bc240fe9be9e690059f710e9f95346d34d before ffb15594433391fd7885eb88ce5a7f7bdeefbb15; from 6b2e04bc240fe9be9e690059f710e9f95346d34d before 7998043d31d000c3a93f46182e6569dd0eecda34; from 6b2e04bc240fe9be9e690059f710e9f95346d34d before 7396ba87f1edf549284869451665c7c4e74ecd4f; 5.12 (not affected: before 5.12; from 5.15.63 up to 5.15.*; from 5.19.4 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 5.12 before 5.15.63; from 5.16 before 5.19.4; 6.0

## References

- <https://git.kernel.org/stable/c/ffb15594433391fd7885eb88ce5a7f7bdeefbb15> (patch)
- <https://git.kernel.org/stable/c/7998043d31d000c3a93f46182e6569dd0eecda34> (patch)
- <https://git.kernel.org/stable/c/7396ba87f1edf549284869451665c7c4e74ecd4f> (patch)

## Sources

- CVE List: [CVE-2022-50043](https://www.cve.org/CVERecord?id=CVE-2022-50043), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50043](https://nvd.nist.gov/vuln/detail/CVE-2022-50043), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50043 · Whole record: https://cve.day/CVE-2022-50043.json · Rebuilt by cve.day 2026-11-25T22:58:21.025Z
