Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.053431] ================================================================== [ 16.053509] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 16.053579] Write of size 33 at addr fff00000c6451100 by task kunit_try_catch/186 [ 16.053969] [ 16.054138] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.054282] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.054308] Hardware name: linux,dummy-virt (DT) [ 16.054345] Call trace: [ 16.054407] show_stack+0x20/0x38 (C) [ 16.054530] dump_stack_lvl+0x8c/0xd0 [ 16.054651] print_report+0x118/0x608 [ 16.054700] kasan_report+0xdc/0x128 [ 16.054939] kasan_check_range+0x100/0x1a8 [ 16.054997] __asan_memset+0x34/0x78 [ 16.055055] kmalloc_uaf_memset+0x170/0x310 [ 16.055113] kunit_try_run_case+0x170/0x3f0 [ 16.055165] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.055219] kthread+0x328/0x630 [ 16.055262] ret_from_fork+0x10/0x20 [ 16.055567] [ 16.055599] Allocated by task 186: [ 16.055926] kasan_save_stack+0x3c/0x68 [ 16.055979] kasan_save_track+0x20/0x40 [ 16.056026] kasan_save_alloc_info+0x40/0x58 [ 16.056097] __kasan_kmalloc+0xd4/0xd8 [ 16.056320] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.056401] kmalloc_uaf_memset+0xb8/0x310 [ 16.056438] kunit_try_run_case+0x170/0x3f0 [ 16.056475] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.056725] kthread+0x328/0x630 [ 16.056759] ret_from_fork+0x10/0x20 [ 16.056794] [ 16.056843] Freed by task 186: [ 16.056869] kasan_save_stack+0x3c/0x68 [ 16.056906] kasan_save_track+0x20/0x40 [ 16.057271] kasan_save_free_info+0x4c/0x78 [ 16.057340] __kasan_slab_free+0x6c/0x98 [ 16.057378] kfree+0x214/0x3c8 [ 16.057452] kmalloc_uaf_memset+0x11c/0x310 [ 16.057519] kunit_try_run_case+0x170/0x3f0 [ 16.057558] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.057973] kthread+0x328/0x630 [ 16.058054] ret_from_fork+0x10/0x20 [ 16.058139] [ 16.058159] The buggy address belongs to the object at fff00000c6451100 [ 16.058159] which belongs to the cache kmalloc-64 of size 64 [ 16.058313] The buggy address is located 0 bytes inside of [ 16.058313] freed 64-byte region [fff00000c6451100, fff00000c6451140) [ 16.058375] [ 16.058403] The buggy address belongs to the physical page: [ 16.058468] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106451 [ 16.058522] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.058610] page_type: f5(slab) [ 16.058743] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 16.058845] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 16.058890] page dumped because: kasan: bad access detected [ 16.058921] [ 16.058940] Memory state around the buggy address: [ 16.058981] fff00000c6451000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.059033] fff00000c6451080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.059187] >fff00000c6451100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.059289] ^ [ 16.059318] fff00000c6451180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.059360] fff00000c6451200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.059398] ==================================================================
[ 12.967590] ================================================================== [ 12.968010] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x1a3/0x360 [ 12.968316] Write of size 33 at addr ffff8881027af600 by task kunit_try_catch/203 [ 12.968688] [ 12.968780] CPU: 0 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.968822] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.968833] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.968852] Call Trace: [ 12.968863] <TASK> [ 12.968878] dump_stack_lvl+0x73/0xb0 [ 12.968907] print_report+0xd1/0x650 [ 12.968929] ? __virt_addr_valid+0x1db/0x2d0 [ 12.968952] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.968973] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.968996] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.969017] kasan_report+0x141/0x180 [ 12.969039] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.969065] kasan_check_range+0x10c/0x1c0 [ 12.969088] __asan_memset+0x27/0x50 [ 12.969107] kmalloc_uaf_memset+0x1a3/0x360 [ 12.969128] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 12.969152] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 12.969178] kunit_try_run_case+0x1a5/0x480 [ 12.969201] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.969224] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.969248] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.969271] ? __kthread_parkme+0x82/0x180 [ 12.969292] ? preempt_count_sub+0x50/0x80 [ 12.969316] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.969340] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.969376] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.969402] kthread+0x337/0x6f0 [ 12.969421] ? trace_preempt_on+0x20/0xc0 [ 12.969457] ? __pfx_kthread+0x10/0x10 [ 12.969477] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.969498] ? calculate_sigpending+0x7b/0xa0 [ 12.969522] ? __pfx_kthread+0x10/0x10 [ 12.969542] ret_from_fork+0x116/0x1d0 [ 12.969562] ? __pfx_kthread+0x10/0x10 [ 12.969583] ret_from_fork_asm+0x1a/0x30 [ 12.969613] </TASK> [ 12.969623] [ 12.975864] Allocated by task 203: [ 12.975998] kasan_save_stack+0x45/0x70 [ 12.976200] kasan_save_track+0x18/0x40 [ 12.976405] kasan_save_alloc_info+0x3b/0x50 [ 12.976618] __kasan_kmalloc+0xb7/0xc0 [ 12.976805] __kmalloc_cache_noprof+0x189/0x420 [ 12.977077] kmalloc_uaf_memset+0xa9/0x360 [ 12.977287] kunit_try_run_case+0x1a5/0x480 [ 12.977554] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.977773] kthread+0x337/0x6f0 [ 12.977891] ret_from_fork+0x116/0x1d0 [ 12.978022] ret_from_fork_asm+0x1a/0x30 [ 12.978218] [ 12.978314] Freed by task 203: [ 12.978478] kasan_save_stack+0x45/0x70 [ 12.978655] kasan_save_track+0x18/0x40 [ 12.978888] kasan_save_free_info+0x3f/0x60 [ 12.979075] __kasan_slab_free+0x56/0x70 [ 12.979210] kfree+0x222/0x3f0 [ 12.979325] kmalloc_uaf_memset+0x12b/0x360 [ 12.979478] kunit_try_run_case+0x1a5/0x480 [ 12.979623] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.980009] kthread+0x337/0x6f0 [ 12.980175] ret_from_fork+0x116/0x1d0 [ 12.980374] ret_from_fork_asm+0x1a/0x30 [ 12.980566] [ 12.980676] The buggy address belongs to the object at ffff8881027af600 [ 12.980676] which belongs to the cache kmalloc-64 of size 64 [ 12.981111] The buggy address is located 0 bytes inside of [ 12.981111] freed 64-byte region [ffff8881027af600, ffff8881027af640) [ 12.981466] [ 12.981538] The buggy address belongs to the physical page: [ 12.981709] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027af [ 12.982054] flags: 0x200000000000000(node=0|zone=2) [ 12.982286] page_type: f5(slab) [ 12.982463] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.983034] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.983296] page dumped because: kasan: bad access detected [ 12.983528] [ 12.983631] Memory state around the buggy address: [ 12.983861] ffff8881027af500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.984137] ffff8881027af580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.984403] >ffff8881027af600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.984612] ^ [ 12.984725] ffff8881027af680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.985286] ffff8881027af700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.985693] ==================================================================