Date
July 9, 2025, 11:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.893301] ================================================================== [ 16.893486] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 16.893675] Write of size 33 at addr fff00000c63bfb80 by task kunit_try_catch/186 [ 16.894259] [ 16.894293] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.894375] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.894447] Hardware name: linux,dummy-virt (DT) [ 16.894484] Call trace: [ 16.894572] show_stack+0x20/0x38 (C) [ 16.894642] dump_stack_lvl+0x8c/0xd0 [ 16.894710] print_report+0x118/0x608 [ 16.894763] kasan_report+0xdc/0x128 [ 16.894853] kasan_check_range+0x100/0x1a8 [ 16.894903] __asan_memset+0x34/0x78 [ 16.894948] kmalloc_uaf_memset+0x170/0x310 [ 16.895001] kunit_try_run_case+0x170/0x3f0 [ 16.895187] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.895244] kthread+0x328/0x630 [ 16.895287] ret_from_fork+0x10/0x20 [ 16.895356] [ 16.895375] Allocated by task 186: [ 16.895461] kasan_save_stack+0x3c/0x68 [ 16.895541] kasan_save_track+0x20/0x40 [ 16.895588] kasan_save_alloc_info+0x40/0x58 [ 16.895646] __kasan_kmalloc+0xd4/0xd8 [ 16.895689] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.895750] kmalloc_uaf_memset+0xb8/0x310 [ 16.895818] kunit_try_run_case+0x170/0x3f0 [ 16.895856] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.895923] kthread+0x328/0x630 [ 16.895955] ret_from_fork+0x10/0x20 [ 16.895991] [ 16.896010] Freed by task 186: [ 16.896035] kasan_save_stack+0x3c/0x68 [ 16.896073] kasan_save_track+0x20/0x40 [ 16.896172] kasan_save_free_info+0x4c/0x78 [ 16.896215] __kasan_slab_free+0x6c/0x98 [ 16.896252] kfree+0x214/0x3c8 [ 16.896350] kmalloc_uaf_memset+0x11c/0x310 [ 16.896426] kunit_try_run_case+0x170/0x3f0 [ 16.896483] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.896550] kthread+0x328/0x630 [ 16.896644] ret_from_fork+0x10/0x20 [ 16.896702] [ 16.896756] The buggy address belongs to the object at fff00000c63bfb80 [ 16.896756] which belongs to the cache kmalloc-64 of size 64 [ 16.896851] The buggy address is located 0 bytes inside of [ 16.896851] freed 64-byte region [fff00000c63bfb80, fff00000c63bfbc0) [ 16.896926] [ 16.896945] The buggy address belongs to the physical page: [ 16.896976] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063bf [ 16.897299] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.897371] page_type: f5(slab) [ 16.897464] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 16.897588] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 16.897657] page dumped because: kasan: bad access detected [ 16.897702] [ 16.897781] Memory state around the buggy address: [ 16.897850] fff00000c63bfa80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.897894] fff00000c63bfb00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.898078] >fff00000c63bfb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.898344] ^ [ 16.898471] fff00000c63bfc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.898538] fff00000c63bfc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.898613] ==================================================================
[ 12.833147] ================================================================== [ 12.834480] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x1a3/0x360 [ 12.834743] Write of size 33 at addr ffff88810320ed80 by task kunit_try_catch/203 [ 12.834973] [ 12.835315] CPU: 1 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.835367] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.835379] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.835400] Call Trace: [ 12.835413] <TASK> [ 12.835593] dump_stack_lvl+0x73/0xb0 [ 12.835636] print_report+0xd1/0x650 [ 12.835660] ? __virt_addr_valid+0x1db/0x2d0 [ 12.835685] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.835719] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.835742] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.835764] kasan_report+0x141/0x180 [ 12.835786] ? kmalloc_uaf_memset+0x1a3/0x360 [ 12.835812] kasan_check_range+0x10c/0x1c0 [ 12.835836] __asan_memset+0x27/0x50 [ 12.835855] kmalloc_uaf_memset+0x1a3/0x360 [ 12.835876] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 12.835899] ? __schedule+0x10cc/0x2b60 [ 12.835921] ? __pfx_read_tsc+0x10/0x10 [ 12.835942] ? ktime_get_ts64+0x86/0x230 [ 12.835968] kunit_try_run_case+0x1a5/0x480 [ 12.835994] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.836016] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.836109] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.836134] ? __kthread_parkme+0x82/0x180 [ 12.836155] ? preempt_count_sub+0x50/0x80 [ 12.836180] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.836204] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.836229] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.836255] kthread+0x337/0x6f0 [ 12.836273] ? trace_preempt_on+0x20/0xc0 [ 12.836297] ? __pfx_kthread+0x10/0x10 [ 12.836326] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.836348] ? calculate_sigpending+0x7b/0xa0 [ 12.836372] ? __pfx_kthread+0x10/0x10 [ 12.836394] ret_from_fork+0x116/0x1d0 [ 12.836413] ? __pfx_kthread+0x10/0x10 [ 12.836433] ret_from_fork_asm+0x1a/0x30 [ 12.836465] </TASK> [ 12.836475] [ 12.844998] Allocated by task 203: [ 12.845182] kasan_save_stack+0x45/0x70 [ 12.845382] kasan_save_track+0x18/0x40 [ 12.845727] kasan_save_alloc_info+0x3b/0x50 [ 12.845992] __kasan_kmalloc+0xb7/0xc0 [ 12.846314] __kmalloc_cache_noprof+0x189/0x420 [ 12.846948] kmalloc_uaf_memset+0xa9/0x360 [ 12.847195] kunit_try_run_case+0x1a5/0x480 [ 12.848227] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.848435] kthread+0x337/0x6f0 [ 12.848559] ret_from_fork+0x116/0x1d0 [ 12.848689] ret_from_fork_asm+0x1a/0x30 [ 12.848839] [ 12.848909] Freed by task 203: [ 12.850427] kasan_save_stack+0x45/0x70 [ 12.851799] kasan_save_track+0x18/0x40 [ 12.852231] kasan_save_free_info+0x3f/0x60 [ 12.852637] __kasan_slab_free+0x56/0x70 [ 12.853416] kfree+0x222/0x3f0 [ 12.853747] kmalloc_uaf_memset+0x12b/0x360 [ 12.854372] kunit_try_run_case+0x1a5/0x480 [ 12.855799] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.856587] kthread+0x337/0x6f0 [ 12.857884] ret_from_fork+0x116/0x1d0 [ 12.858161] ret_from_fork_asm+0x1a/0x30 [ 12.858307] [ 12.858382] The buggy address belongs to the object at ffff88810320ed80 [ 12.858382] which belongs to the cache kmalloc-64 of size 64 [ 12.858746] The buggy address is located 0 bytes inside of [ 12.858746] freed 64-byte region [ffff88810320ed80, ffff88810320edc0) [ 12.860374] [ 12.860751] The buggy address belongs to the physical page: [ 12.861609] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10320e [ 12.862333] flags: 0x200000000000000(node=0|zone=2) [ 12.862523] page_type: f5(slab) [ 12.862650] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.862902] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.863328] page dumped because: kasan: bad access detected [ 12.863514] [ 12.863610] Memory state around the buggy address: [ 12.863850] ffff88810320ec80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.864256] ffff88810320ed00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.864548] >ffff88810320ed80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.864849] ^ [ 12.865015] ffff88810320ee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.865341] ffff88810320ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.865618] ==================================================================