{"id":"CVE-2025-39951","state":"PUBLISHED","title":"um: virtio_uml: Fix use-after-free after put_device in probe","description":"In the Linux kernel, the following vulnerability has been resolved:\n\num: virtio_uml: Fix use-after-free after put_device in probe\n\nWhen register_virtio_device() fails in virtio_uml_probe(),\nthe code sets vu_dev->registered = 1 even though\nthe device was not successfully registered.\nThis can lead to use-after-free or other issues.","publishedAt":"2025-10-04T07:31:11.684Z","updatedAt":"2026-08-05T12:06:24.628Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"14c231959a16ca41bfdcaede72483362a8c645d7","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"5e94e44c9cb30d7a383d8ac227f24a8c9326b770","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"aaf900a83508c8cd5cdf765e7749f9076196ec7f","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"4f364023ddcfe83f7073b973a9cb98584b7f2a46","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"00e98b5a69034b251bb36dc6e7123d7648e218e4","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"c2ff91255e0157b356cff115d8dc3eeb5162edf2","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"7ebf70cf181651fe3f2e44e95e7e5073d594c9c0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/um/drivers/virtio_uml.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"5.10.245","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.194","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.154","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.108","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.49","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.9","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/um/drivers/virtio_uml.c"]}],"references":["https://git.kernel.org/stable/c/14c231959a16ca41bfdcaede72483362a8c645d7","https://git.kernel.org/stable/c/5e94e44c9cb30d7a383d8ac227f24a8c9326b770","https://git.kernel.org/stable/c/aaf900a83508c8cd5cdf765e7749f9076196ec7f","https://git.kernel.org/stable/c/4f364023ddcfe83f7073b973a9cb98584b7f2a46","https://git.kernel.org/stable/c/00e98b5a69034b251bb36dc6e7123d7648e218e4","https://git.kernel.org/stable/c/c2ff91255e0157b356cff115d8dc3eeb5162edf2","https://git.kernel.org/stable/c/7ebf70cf181651fe3f2e44e95e7e5073d594c9c0"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/39xxx/CVE-2025-39951.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39951","state":"PUBLISHED","datePublished":"2025-10-04T07:31:11.684Z","dateUpdated":"2026-08-05T12:06:24.628Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.148Z"},"containers":{"cna":{"title":"um: virtio_uml: Fix use-after-free after put_device in probe","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\num: virtio_uml: Fix use-after-free after put_device in probe\n\nWhen register_virtio_device() fails in virtio_uml_probe(),\nthe code sets vu_dev->registered = 1 even though\nthe device was not successfully registered.\nThis can lead to use-after-free or other issues."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"14c231959a16ca41bfdcaede72483362a8c645d7","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"5e94e44c9cb30d7a383d8ac227f24a8c9326b770","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"aaf900a83508c8cd5cdf765e7749f9076196ec7f","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"4f364023ddcfe83f7073b973a9cb98584b7f2a46","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"00e98b5a69034b251bb36dc6e7123d7648e218e4","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"c2ff91255e0157b356cff115d8dc3eeb5162edf2","versionType":"git"},{"version":"04e5b1fb01834a602acaae2276b67a783a8c6159","status":"affected","lessThan":"7ebf70cf181651fe3f2e44e95e7e5073d594c9c0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/um/drivers/virtio_uml.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"5.10.245","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.194","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.154","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.108","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.49","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.16.9","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/um/drivers/virtio_uml.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/14c231959a16ca41bfdcaede72483362a8c645d7"},{"url":"https://git.kernel.org/stable/c/5e94e44c9cb30d7a383d8ac227f24a8c9326b770"},{"url":"https://git.kernel.org/stable/c/aaf900a83508c8cd5cdf765e7749f9076196ec7f"},{"url":"https://git.kernel.org/stable/c/4f364023ddcfe83f7073b973a9cb98584b7f2a46"},{"url":"https://git.kernel.org/stable/c/00e98b5a69034b251bb36dc6e7123d7648e218e4"},{"url":"https://git.kernel.org/stable/c/c2ff91255e0157b356cff115d8dc3eeb5162edf2"},{"url":"https://git.kernel.org/stable/c/7ebf70cf181651fe3f2e44e95e7e5073d594c9c0"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is a UML platform/virtio driver probe path reached through local device configuration (kernel command line, devicetree, mconsole, or sysfs driver bind), not through any remote protocol; the vhost-user peer is a local UNIX socket. No network-supplied data influences the failing call.\nAC:L - The `register_virtio_device()` failure can be produced deterministically via the OF path (`virtio_device_of_init()` returns -EINVAL when the parent node has more than one available child) and can also be induced by attacker-driven memory pressure on the `ida_alloc`/`dev_set_name`/`device_add` allocations; no condition outside the attacker's influence must hold.\nPR:L - A local unprivileged account on the UML instance suffices to drive the allocation-failure condition that makes the probe fail, and the resulting write-after-free happens with no further authorization check; no capability is validated in `virtio_uml_probe()` itself.\nUI:N - The faulty path executes automatically during driver probe/bind; nothing requires a victim to open a file, mount a filesystem, or otherwise interact.\nS:U - The corrupted memory and the vulnerable code are both in the kernel's own heap and security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The use-after-free leaves a freed `struct virtio_uml_device` (and a dangling `platform_set_drvdata` pointer) in play; an attacker who reclaims the slab slot with a chosen object gains a read primitive over kernel memory contents.\nI:H - The code performs an out-of-lifetime read-modify-write into the freed object, so heap grooming lets an attacker corrupt an unrelated reclaimed kernel structure, which is exploitable toward arbitrary write and control-flow hijack.\nA:H - Writing into freed slab memory corrupts allocator state and adjacent live objects, reliably producing kernel oops/panic (and KASAN slab-use-after-free splats) that take down the kernel instance."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:06:24.628Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.10.245"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.15.194"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.1.154"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.6.108"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.12.49"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.16.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}