# CVE-2023-53426: xsk: Fix xsk_diag use-after-free error during socket cleanup

- 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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-09-18T16:04:08.192Z
- Modified: 2026-08-05T09:14:03.906Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

xsk: Fix xsk_diag use-after-free error during socket cleanup

Fix a use-after-free error that is possible if the xsk_diag interface
is used after the socket has been unbound from the device. This can
happen either due to the socket being closed or the device
disappearing. In the early days of AF_XDP, the way we tested that a
socket was not bound to a device was to simply check if the netdevice
pointer in the xsk socket structure was NULL. Later, a better system
was introduced by having an explicit state variable in the xsk socket
struct. For example, the state of a socket that is on the way to being
closed and has been unbound from the device is XSK_UNBOUND.

The commit in the Fixes tag below deleted the old way of signalling
that a socket is unbound, setting dev to NULL. This in the belief that
all code using the old way had been exterminated. That was
unfortunately not true as the xsk diagnostics code was still using the
old way and thus does not work as intended when a socket is going
down. Fix this by introducing a test against the state variable. If
the socket is in the state XSK_UNBOUND, simply abort the diagnostic's
netlink operation.

(As written by CVE List.)

## Affected

- Linux Linux: from ad7219cd8751bd258b9d1e69ae0654ec00f71875 before 5979985f2d6b565b6cf0f79a62670a2855c0e96c; from 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21 before 6436973164ea5506a495f39e56be5aea375e7832; from 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21 before 595931912357fa3507e522a7f8a0a76e423c23e4; from 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21 before 3e019d8a05a38abb5c85d4f1e85fda964610aa14; d1579253ffce39986e7a6ab757ac93b2680a665f; 8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9; from 5.15.33 before 5.15.132; from 5.16.19 before 5.17; from 5.17.2 before 5.18; 5.18 (not affected: before 5.18; from 5.15.132 up to 5.15.*; from 6.1.54 up to 6.1.*; from 6.5.4 up to 6.5.*; from 6.6 up to *)
- linux linux_kernel: from 5.15.33 before 5.15.132; from 5.16.19 before 5.17; from 5.17.2 before 6.1.54; from 6.2 before 6.5.4

## 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`
- CISA-ADP: 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 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/5979985f2d6b565b6cf0f79a62670a2855c0e96c> (patch)
- <https://git.kernel.org/stable/c/6436973164ea5506a495f39e56be5aea375e7832> (patch)
- <https://git.kernel.org/stable/c/595931912357fa3507e522a7f8a0a76e423c23e4> (patch)
- <https://git.kernel.org/stable/c/3e019d8a05a38abb5c85d4f1e85fda964610aa14> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2023-53426 · Whole record: https://cve.day/CVE-2023-53426.json · Rebuilt by cve.day 2026-11-25T22:58:34.877Z
