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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-09-18T16:04:08.192Z
- **Modified:** 2026-08-05T09:14:03.906Z

## Who should check

- Anyone running Linux \>= ad7219cd8751bd258b9d1e69ae0654ec00f71875, \< 5979985f2d6b565b6cf0f79a62670a2855c0e96c; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 6436973164ea5506a495f39e56be5aea375e7832; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 595931912357fa3507e522a7f8a0a76e423c23e4; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 3e019d8a05a38abb5c85d4f1e85fda964610aa14; d1579253ffce39986e7a6ab757ac93b2680a665f; 8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9; \>= 5.15.33, \< 5.15.132; \>= 5.16.19, \< 5.17; \>= 5.17.2, \< 5.18
- Anyone running Linux 5.18

## 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.

## Affected and fixed versions

- Linux: \>= ad7219cd8751bd258b9d1e69ae0654ec00f71875, \< 5979985f2d6b565b6cf0f79a62670a2855c0e96c; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 6436973164ea5506a495f39e56be5aea375e7832; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 595931912357fa3507e522a7f8a0a76e423c23e4; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 3e019d8a05a38abb5c85d4f1e85fda964610aa14; d1579253ffce39986e7a6ab757ac93b2680a665f; 8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9; \>= 5.15.33, \< 5.15.132; \>= 5.16.19, \< 5.17; \>= 5.17.2, \< 5.18 (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- Upgrade Linux to 5.18 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53426. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53426.md
Affected: Linux >= ad7219cd8751bd258b9d1e69ae0654ec00f71875, < 5979985f2d6b565b6cf0f79a62670a2855c0e96c; >= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, < 6436973164ea5506a495f39e56be5aea375e7832; >= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, < 595931912357fa3507e522a7f8a0a76e423c23e4; >= 18b1ab7aa76bde181bdb1ab…
Fixed in: Linux 5979985f2d6b565b6cf0f79a62670a2855c0e96c, Linux 6436973164ea5506a495f39e56be5aea375e7832, Linux 595931912357fa3507e522a7f8a0a76e423c23e4, Linux 3e019d8a05a38abb5c85d4f1e85fda964610aa14, Linux 5.15.132, Linux 5.17, Linux 5.18

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-53426 being exploited?

There is no confirmed exploitation: CVE-2023-53426 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53426?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-53426?

Linux \>= ad7219cd8751bd258b9d1e69ae0654ec00f71875, \< 5979985f2d6b565b6cf0f79a62670a2855c0e96c; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 6436973164ea5506a495f39e56be5aea375e7832; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 595931912357fa3507e522a7f8a0a76e423c23e4; \>= 18b1ab7aa76bde181bdb1ab19a87fa9523c32f21, \< 3e019d8a05a38abb5c85d4f1e85fda964610aa14; d1579253ffce39986e7a6ab757ac93b2680a665f; 8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9; \>= 5.15.33, \< 5.15.132; \>= 5.16.19, \< 5.17; \>= 5.17.2, \< 5.18; Linux 5.18.

### Is there a fix for CVE-2023-53426?

Yes. Fixed in Linux 5979985f2d6b565b6cf0f79a62670a2855c0e96c, Linux 6436973164ea5506a495f39e56be5aea375e7832, Linux 595931912357fa3507e522a7f8a0a76e423c23e4, Linux 3e019d8a05a38abb5c85d4f1e85fda964610aa14, Linux 5.15.132, Linux 5.17, Linux 5.18. Upgrade Linux to 5.18 or later.

### How do I check if I'm affected by CVE-2023-53426?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53426>

HTML: <https://flawdb.com/CVE-2023-53426> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53426>
