CVE-2025-38620 (GCVE-0-2025-38620)
Vulnerability from cvelistv5
Published
2025-08-22 16:00
Modified
2025-08-22 16:00
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
zloop: fix KASAN use-after-free of tag set
When a zoned loop device, or zloop device, is removed, KASAN enabled
kernel reports "BUG KASAN use-after-free" in blk_mq_free_tag_set(). The
BUG happens because zloop_ctl_remove() calls put_disk(), which invokes
zloop_free_disk(). The zloop_free_disk() frees the memory allocated for
the zlo pointer. However, after the memory is freed, zloop_ctl_remove()
calls blk_mq_free_tag_set(&zlo->tag_set), which accesses the freed zlo.
Hence the KASAN use-after-free.
zloop_ctl_remove()
put_disk(zlo->disk)
put_device()
kobject_put()
...
zloop_free_disk()
kvfree(zlo)
blk_mq_free_tag_set(&zlo->tag_set)
To avoid the BUG, move the call to blk_mq_free_tag_set(&zlo->tag_set)
from zloop_ctl_remove() into zloop_free_disk(). This ensures that
the tag_set is freed before the call to kvfree(zlo).
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/block/zloop.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "c7c87046b41a9ef28ee7ac476c369da5b5228bc5", "status": "affected", "version": "eb0570c7df23c2f32fe899fcdaf8fca9a5ecd51e", "versionType": "git" }, { "lessThan": "765761851d89c772f482494d452e266795460278", "status": "affected", "version": "eb0570c7df23c2f32fe899fcdaf8fca9a5ecd51e", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/block/zloop.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "6.16" }, { "lessThan": "6.16", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.16.*", "status": "unaffected", "version": "6.16.1", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.17-rc1", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16.1", "versionStartIncluding": "6.16", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.17-rc1", "versionStartIncluding": "6.16", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nzloop: fix KASAN use-after-free of tag set\n\nWhen a zoned loop device, or zloop device, is removed, KASAN enabled\nkernel reports \"BUG KASAN use-after-free\" in blk_mq_free_tag_set(). The\nBUG happens because zloop_ctl_remove() calls put_disk(), which invokes\nzloop_free_disk(). The zloop_free_disk() frees the memory allocated for\nthe zlo pointer. However, after the memory is freed, zloop_ctl_remove()\ncalls blk_mq_free_tag_set(\u0026zlo-\u003etag_set), which accesses the freed zlo.\nHence the KASAN use-after-free.\n\n zloop_ctl_remove()\n put_disk(zlo-\u003edisk)\n put_device()\n kobject_put()\n ...\n zloop_free_disk()\n kvfree(zlo)\n blk_mq_free_tag_set(\u0026zlo-\u003etag_set)\n\nTo avoid the BUG, move the call to blk_mq_free_tag_set(\u0026zlo-\u003etag_set)\nfrom zloop_ctl_remove() into zloop_free_disk(). This ensures that\nthe tag_set is freed before the call to kvfree(zlo)." } ], "providerMetadata": { "dateUpdated": "2025-08-22T16:00:24.445Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/c7c87046b41a9ef28ee7ac476c369da5b5228bc5" }, { "url": "https://git.kernel.org/stable/c/765761851d89c772f482494d452e266795460278" } ], "title": "zloop: fix KASAN use-after-free of tag set", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-38620", "datePublished": "2025-08-22T16:00:24.445Z", "dateReserved": "2025-04-16T04:51:24.029Z", "dateUpdated": "2025-08-22T16:00:24.445Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-38620\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-08-22T16:15:35.320\",\"lastModified\":\"2025-08-22T18:08:51.663\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nzloop: fix KASAN use-after-free of tag set\\n\\nWhen a zoned loop device, or zloop device, is removed, KASAN enabled\\nkernel reports \\\"BUG KASAN use-after-free\\\" in blk_mq_free_tag_set(). The\\nBUG happens because zloop_ctl_remove() calls put_disk(), which invokes\\nzloop_free_disk(). The zloop_free_disk() frees the memory allocated for\\nthe zlo pointer. However, after the memory is freed, zloop_ctl_remove()\\ncalls blk_mq_free_tag_set(\u0026zlo-\u003etag_set), which accesses the freed zlo.\\nHence the KASAN use-after-free.\\n\\n zloop_ctl_remove()\\n put_disk(zlo-\u003edisk)\\n put_device()\\n kobject_put()\\n ...\\n zloop_free_disk()\\n kvfree(zlo)\\n blk_mq_free_tag_set(\u0026zlo-\u003etag_set)\\n\\nTo avoid the BUG, move the call to blk_mq_free_tag_set(\u0026zlo-\u003etag_set)\\nfrom zloop_ctl_remove() into zloop_free_disk(). This ensures that\\nthe tag_set is freed before the call to kvfree(zlo).\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/765761851d89c772f482494d452e266795460278\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c7c87046b41a9ef28ee7ac476c369da5b5228bc5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…