# CVE-2021-47248: udp: fix race between close() and udp_abort()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2024-05-21T14:19:45.588Z
- Modified: 2026-08-05T08:46:58.552Z
- Weaknesses: CWE-362
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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>

(As written by CVE List.)

## Affected

- Linux Linux: from 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.*; from 5.12.13 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 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.13

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/e3c36c773aed0fef8b1d3d555b43393ec564400f> (patch)
- <https://git.kernel.org/stable/c/a0882f68f54f7a8b6308261acee9bd4faab5a69e> (patch)
- <https://git.kernel.org/stable/c/2f73448041bd0682d4b552cfd314ace66107f1ad> (patch)
- <https://git.kernel.org/stable/c/5a88477c1c85e4baa51e91f2d40f2166235daa56> (patch)
- <https://git.kernel.org/stable/c/8729ec8a2238152a4afc212a331a6cd2c61aeeac> (patch)
- <https://git.kernel.org/stable/c/65310b0aff86980a011c7c7bfa487a333d4ca241> (patch)
- <https://git.kernel.org/stable/c/a8b897c7bcd47f4147d066e22cc01d1026d7640e> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2021-47248 · Whole record: https://cve.day/CVE-2021-47248.json · Rebuilt by cve.day 2026-11-25T22:58:08.756Z
