5.5medium
net: fix potential refcount leak in ndisc_router_discovery()
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.20% (higher than 10% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| 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 * | CVE List |
| linux linux_kernel | from 5.12 before 5.15.63, from 5.16 before 5.19.4, 6.0 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: corrección de una posible fuga de referencias en ndisc_router_discovery(). El problema se produce en rutas específicas de la función. Tras la captura correcta de los objetos `rt` y `neigh`, cuando `lifetime` es distinto de cero pero la métrica necesita cambiar, la función simplemente elimina la ruta y establece `rt` en NULL. A continuación, puede intentar capturar `rt` y `neigh` de nuevo si se cumplen las condiciones anteriores. La función simplemente sobrescribe `neigh` si tiene éxito o retorna si falla, sin reducir la cantidad de referencias de `neigh` anterior. Esto puede provocar fugas de memoria. Para solucionarlo, reduzca la cantidad de referencias de `neigh` en su lugar.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-50043 changed 2026-11-05 | CVE Terms of Use |
| NVD | CVE-2022-50043 changed 2026-11-05 | Public domain |