Linux
mm/slub: reset KASAN tag in defer_free() before accessing freed memory
In the Linux kernel, the following vulnerability has been resolved: mm/slub: reset KASAN tag in defer_free() before accessing freed memory When CONFIG_SLUB_TINY is enabled, kfree_nolock() calls kasan_slab_free() before defer_free(). On ARM64 with MTE (Memory Tagging Extension), kasan_slab_free() poisons the memory and changes the tag from the original (e.g., 0xf3) to a poison tag (0xfe). When defer_free() then tries to write to the freed object to build the deferred free list via llist_add(), the pointer still has the old tag, causing a tag mismatch and triggering a KASAN use-after-free report: BUG: KASAN: slab-use-after-free in defer_free+0x3c/0xbc mm/slub.c:6537 Write at addr f3f000000854f020 by task kworker/u8:6/983 Pointer tag: [f3], memory tag: [fe] Fix this by calling kasan_reset_tag() before accessing the freed memory. This is safe because defer_free() is part of the allocator itself and is expected to manipulate freed memory for bookkeeping purposes.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= af92793e52c3a99b828ed4bdd277fd3e11c18d08, < 65d4e5af2a2e82f4fc50d8259aee208fbc6b2c1d
- >= af92793e52c3a99b828ed4bdd277fd3e11c18d08, < 53ca00a19d345197a37a1bf552e8d1e7b091666c
Fixed in 65d4e5af2a2e82f4fc50d8259aee208fbc6b2c1d, 53ca00a19d345197a37a1bf552e8d1e7b091666c
- 6.18
Fixed in 0, 6.18.3, 6.19
Mitigation
Upgrade Linux to 65d4e5af2a2e82f4fc50d8259aee208fbc6b2c1d or 53ca00a19d345197a37a1bf552e8d1e7b091666c or later.
Upgrade Linux to 0 or 6.18.3 or 6.19 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.