{"id":"CVE-2023-53426","summary":"xsk: Fix xsk_diag use-after-free error during socket cleanup","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nxsk: Fix xsk_diag use-after-free error during socket cleanup\n\nFix a use-after-free error that is possible if the xsk_diag interface\nis used after the socket has been unbound from the device. This can\nhappen either due to the socket being closed or the device\ndisappearing. In the early days of AF_XDP, the way we tested that a\nsocket was not bound to a device was to simply check if the netdevice\npointer in the xsk socket structure was NULL. Later, a better system\nwas introduced by having an explicit state variable in the xsk socket\nstruct. For example, the state of a socket that is on the way to being\nclosed and has been unbound from the device is XSK_UNBOUND.\n\nThe commit in the Fixes tag below deleted the old way of signalling\nthat a socket is unbound, setting dev to NULL. This in the belief that\nall code using the old way had been exterminated. That was\nunfortunately not true as the xsk diagnostics code was still using the\nold way and thus does not work as intended when a socket is going\ndown. Fix this by introducing a test against the state variable. If\nthe socket is in the state XSK_UNBOUND, simply abort the diagnostic's\nnetlink operation.","modified":"2026-04-02T09:44:11.288889Z","published":"2025-09-18T16:04:08.192Z","related":["SUSE-SU-2025:03600-1","SUSE-SU-2025:03634-1","SUSE-SU-2025:20851-1","SUSE-SU-2025:20861-1","SUSE-SU-2025:20870-1","SUSE-SU-2025:20898-1","SUSE-SU-2025:3751-1","SUSE-SU-2025:4057-1","SUSE-SU-2025:4132-1","SUSE-SU-2025:4141-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53426.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3e019d8a05a38abb5c85d4f1e85fda964610aa14"},{"type":"WEB","url":"https://git.kernel.org/stable/c/595931912357fa3507e522a7f8a0a76e423c23e4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5979985f2d6b565b6cf0f79a62670a2855c0e96c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6436973164ea5506a495f39e56be5aea375e7832"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53426.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53426"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ad7219cd8751bd258b9d1e69ae0654ec00f71875"},{"fixed":"5979985f2d6b565b6cf0f79a62670a2855c0e96c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"18b1ab7aa76bde181bdb1ab19a87fa9523c32f21"},{"fixed":"6436973164ea5506a495f39e56be5aea375e7832"},{"fixed":"595931912357fa3507e522a7f8a0a76e423c23e4"},{"fixed":"3e019d8a05a38abb5c85d4f1e85fda964610aa14"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"d1579253ffce39986e7a6ab757ac93b2680a665f"},{"last_affected":"8a2dea162b92c322f3e42eae0c4a74b8d20aa7a9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53426.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}