virtio-mmio: don't break lifecycle of vm_dev
In the Linux kernel, the following vulnerability has been resolved: virtio-mmio: don't break lifecycle of vm_dev vm_dev has a separate lifecycle because it has a 'struct device' embedded. Thus, having a release callback for it is correct. Allocating the vm_dev struct with devres totally breaks this protection, though. Instead of waiting for the vm_dev release callback, the memory is freed when the platform_device is removed. Resulting in a use-after-free when finally the callback is to be called. To easily see the problem, compile the kernel with CONFIG_DEBUG_KOBJECT_RELEASE and unbind with sysfs. The fix is easy, don't use devres in this case. Found during my research about object lifetime problems.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.19.293, 5.10.192, 5.15.128, 5.4.255, 6.1.47, 6.4.12
- CVEs
- CVE-2023-53515
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:24 UTC · Revision 1
Source evidence
virtio-mmio: don't break lifecycle of vm_dev
core-osv · Original sourcePublished 1 Oct 2025, 11:46 UTC
In the Linux kernel, the following vulnerability has been resolved: virtio-mmio: don't break lifecycle of vm_dev vm_dev has a separate lifecycle because it has a 'struct device' embedded. Thus, having a release callback for it is correct. Allocating the vm_dev struct with devres totally breaks this protection, though. Instead of waiting for the vm_dev release callback, the memory is freed when the platform_device is removed. Resulting in a use-after-free when finally the callback is to be called. To easily see the problem, compile the kernel with CONFIG_DEBUG_KOBJECT_RELEASE and unbind with sysfs. The fix is easy, don't use devres in this case. Found during my research about object lifetime problems.
osv:CVE-2023-53515
Kernel
Fixed versions: 4.19.293, 5.4.255, 5.10.192, 5.15.128, 6.1.47, 6.4.12
Complete source record
{
"id": "d3b05b3598ed016d837753aecad28401cc3df6376f9ce025475bc0b6578cc45f",
"url": "https://osv.dev/vulnerability/CVE-2023-53515",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "virtio-mmio: don't break lifecycle of vm_dev",
"summary": "In the Linux kernel, the following vulnerability has been resolved: virtio-mmio: don't break lifecycle of vm_dev vm_dev has a separate lifecycle because it has a 'struct device' embedded. Thus, having a release callback for it is correct. Allocating the vm_dev struct with devres totally breaks this protection, though. Instead of waiting for the vm_dev release callback, the memory is freed when the platform_device is removed. Resulting in a use-after-free when finally the callback is to be called. To easily see the problem, compile the kernel with CONFIG_DEBUG_KOBJECT_RELEASE and unbind with sysfs. The fix is easy, don't use devres in this case. Found during my research about object lifetime problems.",
"evidence": "osv:CVE-2023-53515",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.19.293",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.255",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.192",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.128",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.47",
"evidence": "/affected/1/ranges"
},
{
"value": "6.4.12",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2023-53515",
"aliases": [
"CVE-2023-53515"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5"
},
{
"fixed": "97a2d55ead76358245b446efd87818e919196d7a"
},
{
"fixed": "b788ad3b2468512339c05f23692e36860264e674"
},
{
"fixed": "3ff54d904fafabd0912796785e53cce4e69ca123"
},
{
"fixed": "5b7d5c2dd664eb8b9a06ecbc06e28d39359c422e"
},
{
"fixed": "af5818c35173e096085c6ae2e3aac605d3d15e41"
},
{
"fixed": "2dcb368fe5a8eee498ca75c93a18ce2f3b0d6a8e"
},
{
"fixed": "55c91fedd03d7b9cf0c5199b2eb12b9b8e95281a"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53515.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.293"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.255"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.192"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.128"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.47"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.4.12"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53515.json"
}
}
],
"modified": "2026-10-28T02:30:37.187299096Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/2dcb368fe5a8eee498ca75c93a18ce2f3b0d6a8e",
"https://git.kernel.org/stable/c/3ff54d904fafabd0912796785e53cce4e69ca123",
"https://git.kernel.org/stable/c/55c91fedd03d7b9cf0c5199b2eb12b9b8e95281a",
"https://git.kernel.org/stable/c/5b7d5c2dd664eb8b9a06ecbc06e28d39359c422e",
"https://git.kernel.org/stable/c/97a2d55ead76358245b446efd87818e919196d7a",
"https://git.kernel.org/stable/c/af5818c35173e096085c6ae2e3aac605d3d15e41",
"https://git.kernel.org/stable/c/b788ad3b2468512339c05f23692e36860264e674",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53515.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-53515",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53515.json"
}
},
"related_cves": [
{
"value": "CVE-2023-53515",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 504093,
"published_at": "2025-10-01T11:46:03.192+00:00"
}