CVE-2021-47248
JSON

7.8high

udp: fix race between close() and udp_abort()

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.25% (higher than 10% of CVEs)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: udp: fix race between close() and udp_abort() Kaustubh reported and diagnosed a panic in udp_lib_lookup(). The root cause is udp_abort() racing with close(). Both racing functions acquire the socket lock, but udp{v6}_destroy_sock() release it before performing destructive actions. We can't easily extend the socket lock scope to avoid the race, instead use the SOCK_DEAD flag to prevent udp_abort from doing any action when the critical race happens. Diagnosed-and-tested-by: Kaustubh Pandey <kapandey@codeaurora.org>

Affected

Product or packageVersionsReported by
Linux Linuxfrom 5d77dca82839ef016a93ad7acd7058b14d967752 before e3c36c773aed0fef8b1d3d555b43393ec564400f, from 5d77dca82839ef016a93ad7acd7058b14d967752 before a0882f68f54f7a8b6308261acee9bd4faab5a69e, from 5d77dca82839ef016a93ad7acd7058b14d967752 before 2f73448041bd0682d4b552cfd314ace66107f1ad, from 5d77dca82839ef016a93ad7acd7058b14d967752 before 5a88477c1c85e4baa51e91f2d40f2166235daa56, from 5d77dca82839ef016a93ad7acd7058b14d967752 before 8729ec8a2238152a4afc212a331a6cd2c61aeeac, from 5d77dca82839ef016a93ad7acd7058b14d967752 before 65310b0aff86980a011c7c7bfa487a333d4ca241, from 5d77dca82839ef016a93ad7acd7058b14d967752 before a8b897c7bcd47f4147d066e22cc01d1026d7640e, 4.9
Not affected: before 4.9, from 4.9.274 up to 4.9.*, from 4.14.238 up to 4.14.*, from 4.19.196 up to 4.19.*, from 5.4.128 up to 5.4.*, from 5.10.46 up to 5.10.*
CVE List
linux linux_kernelfrom 4.9 before 4.9.274, from 4.10 before 4.14.238, from 4.15 before 4.19.196, from 4.20 before 5.4.128, from 5.5 before 5.10.46, from 5.11 before 5.12.13, 5.13NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-362

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: udp: fix race between close() and udp_abort() Kaustubh reported and diagnosed a panic in udp_lib_lookup(). The root cause is udp_abort() racing with close(). Both racing functions acquire the socket lock, but udp{v6}_destroy_sock() release it before performing destructive actions. We can't easily extend the socket lock scope to avoid the race, instead use the SOCK_DEAD flag to prevent udp_abort from doing any action when the critical race happens. Diagnosed-and-tested-by: Kaustubh Pandey <kapandey@codeaurora.org>

NVD (es)

En el kernel de Linux se ha resuelto la siguiente vulnerabilidad: udp: corrige la ejecución entre close() y udp_abort(). Kaustubh informó y diagnosticó un pánico en udp_lib_lookup(). La causa principal es que udp_abort() compite con close(). Ambas funciones de ejecución adquieren el bloqueo del socket, pero udp{v6}_destroy_sock() lo libera antes de realizar acciones destructivas. No podemos extender fácilmente el alcance del bloqueo del socket para evitar la ejecución; en su lugar, usamos el indicador SOCK_DEAD para evitar que udp_abort realice alguna acción cuando ocurre la ejecución crítica. Diagnosticado y probado por: Kaustubh Pandey

References

Sources

SourceRecordLicence
CVE ListCVE-2021-47248 changed 2026-08-05CVE Terms of Use
NVDCVE-2021-47248 changed 2026-08-04Public domain