Date
July 22, 2025, 2:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.353247] ================================================================== [ 17.353527] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 17.353895] Write of size 33 at addr fff00000c3e99f80 by task kunit_try_catch/188 [ 17.353983] [ 17.354017] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT [ 17.354097] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.354124] Hardware name: linux,dummy-virt (DT) [ 17.354154] Call trace: [ 17.354175] show_stack+0x20/0x38 (C) [ 17.354729] dump_stack_lvl+0x8c/0xd0 [ 17.354912] print_report+0x118/0x5d0 [ 17.354996] kasan_report+0xdc/0x128 [ 17.355074] kasan_check_range+0x100/0x1a8 [ 17.355329] __asan_memset+0x34/0x78 [ 17.355513] kmalloc_uaf_memset+0x170/0x310 [ 17.355563] kunit_try_run_case+0x170/0x3f0 [ 17.355614] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.355666] kthread+0x328/0x630 [ 17.355712] ret_from_fork+0x10/0x20 [ 17.355827] [ 17.355847] Allocated by task 188: [ 17.355884] kasan_save_stack+0x3c/0x68 [ 17.355932] kasan_save_track+0x20/0x40 [ 17.355977] kasan_save_alloc_info+0x40/0x58 [ 17.356015] __kasan_kmalloc+0xd4/0xd8 [ 17.356065] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.356113] kmalloc_uaf_memset+0xb8/0x310 [ 17.356155] kunit_try_run_case+0x170/0x3f0 [ 17.356210] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.356250] kthread+0x328/0x630 [ 17.356306] ret_from_fork+0x10/0x20 [ 17.356340] [ 17.356360] Freed by task 188: [ 17.356393] kasan_save_stack+0x3c/0x68 [ 17.356438] kasan_save_track+0x20/0x40 [ 17.356482] kasan_save_free_info+0x4c/0x78 [ 17.356520] __kasan_slab_free+0x6c/0x98 [ 17.356564] kfree+0x214/0x3c8 [ 17.356604] kmalloc_uaf_memset+0x11c/0x310 [ 17.356642] kunit_try_run_case+0x170/0x3f0 [ 17.356689] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.356728] kthread+0x328/0x630 [ 17.356771] ret_from_fork+0x10/0x20 [ 17.356805] [ 17.356823] The buggy address belongs to the object at fff00000c3e99f80 [ 17.356823] which belongs to the cache kmalloc-64 of size 64 [ 17.356894] The buggy address is located 0 bytes inside of [ 17.356894] freed 64-byte region [fff00000c3e99f80, fff00000c3e99fc0) [ 17.356954] [ 17.356974] The buggy address belongs to the physical page: [ 17.357014] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103e99 [ 17.357065] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.357116] page_type: f5(slab) [ 17.357171] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 17.357219] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 17.357259] page dumped because: kasan: bad access detected [ 17.357769] [ 17.357793] Memory state around the buggy address: [ 17.358457] fff00000c3e99e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.358601] fff00000c3e99f00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.358737] >fff00000c3e99f80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.358775] ^ [ 17.358829] fff00000c3e9a000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 17.358877] fff00000c3e9a080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.359316] ==================================================================
[ 11.376024] ================================================================== [ 11.376557] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x1a3/0x360 [ 11.376893] Write of size 33 at addr ffff8881028bc400 by task kunit_try_catch/206 [ 11.377212] [ 11.377315] CPU: 1 UID: 0 PID: 206 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT(voluntary) [ 11.377635] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.377650] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.377673] Call Trace: [ 11.377686] <TASK> [ 11.377703] dump_stack_lvl+0x73/0xb0 [ 11.377730] print_report+0xd1/0x610 [ 11.377752] ? __virt_addr_valid+0x1db/0x2d0 [ 11.377774] ? kmalloc_uaf_memset+0x1a3/0x360 [ 11.377813] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.377836] ? kmalloc_uaf_memset+0x1a3/0x360 [ 11.377857] kasan_report+0x141/0x180 [ 11.377879] ? kmalloc_uaf_memset+0x1a3/0x360 [ 11.378008] kasan_check_range+0x10c/0x1c0 [ 11.378029] __asan_memset+0x27/0x50 [ 11.378048] kmalloc_uaf_memset+0x1a3/0x360 [ 11.378069] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 11.378092] ? __schedule+0x10c6/0x2b60 [ 11.378117] ? __pfx_read_tsc+0x10/0x10 [ 11.378137] ? ktime_get_ts64+0x86/0x230 [ 11.378162] kunit_try_run_case+0x1a5/0x480 [ 11.378183] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.378201] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.378221] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.378258] ? __kthread_parkme+0x82/0x180 [ 11.378280] ? preempt_count_sub+0x50/0x80 [ 11.378304] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.378324] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.378346] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.378382] kthread+0x337/0x6f0 [ 11.378398] ? trace_preempt_on+0x20/0xc0 [ 11.378421] ? __pfx_kthread+0x10/0x10 [ 11.378438] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.378461] ? calculate_sigpending+0x7b/0xa0 [ 11.378482] ? __pfx_kthread+0x10/0x10 [ 11.378501] ret_from_fork+0x41/0x80 [ 11.378521] ? __pfx_kthread+0x10/0x10 [ 11.378539] ret_from_fork_asm+0x1a/0x30 [ 11.378570] </TASK> [ 11.378581] [ 11.388624] Allocated by task 206: [ 11.389085] kasan_save_stack+0x45/0x70 [ 11.389304] kasan_save_track+0x18/0x40 [ 11.389507] kasan_save_alloc_info+0x3b/0x50 [ 11.389914] __kasan_kmalloc+0xb7/0xc0 [ 11.390091] __kmalloc_cache_noprof+0x189/0x420 [ 11.390303] kmalloc_uaf_memset+0xa9/0x360 [ 11.390850] kunit_try_run_case+0x1a5/0x480 [ 11.391146] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.391481] kthread+0x337/0x6f0 [ 11.391705] ret_from_fork+0x41/0x80 [ 11.391951] ret_from_fork_asm+0x1a/0x30 [ 11.392144] [ 11.392216] Freed by task 206: [ 11.392400] kasan_save_stack+0x45/0x70 [ 11.392576] kasan_save_track+0x18/0x40 [ 11.392724] kasan_save_free_info+0x3f/0x60 [ 11.392939] __kasan_slab_free+0x56/0x70 [ 11.393125] kfree+0x222/0x3f0 [ 11.393740] kmalloc_uaf_memset+0x12b/0x360 [ 11.393900] kunit_try_run_case+0x1a5/0x480 [ 11.394508] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.394831] kthread+0x337/0x6f0 [ 11.395146] ret_from_fork+0x41/0x80 [ 11.395335] ret_from_fork_asm+0x1a/0x30 [ 11.395722] [ 11.395815] The buggy address belongs to the object at ffff8881028bc400 [ 11.395815] which belongs to the cache kmalloc-64 of size 64 [ 11.396476] The buggy address is located 0 bytes inside of [ 11.396476] freed 64-byte region [ffff8881028bc400, ffff8881028bc440) [ 11.397184] [ 11.397300] The buggy address belongs to the physical page: [ 11.397988] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028bc [ 11.398325] flags: 0x200000000000000(node=0|zone=2) [ 11.398562] page_type: f5(slab) [ 11.398976] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.399392] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.399804] page dumped because: kasan: bad access detected [ 11.400112] [ 11.400191] Memory state around the buggy address: [ 11.400397] ffff8881028bc300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.400861] ffff8881028bc380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.401291] >ffff8881028bc400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.402060] ^ [ 11.402392] ffff8881028bc480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.402975] ffff8881028bc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.403619] ==================================================================