Date
July 1, 2025, 3:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.236280] ================================================================== [ 19.236360] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 19.236413] Read of size 1 at addr fff00000c57eabd0 by task kunit_try_catch/260 [ 19.236466] [ 19.236887] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.237285] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.237323] Hardware name: linux,dummy-virt (DT) [ 19.237359] Call trace: [ 19.237382] show_stack+0x20/0x38 (C) [ 19.237437] dump_stack_lvl+0x8c/0xd0 [ 19.237493] print_report+0x118/0x608 [ 19.237560] kasan_report+0xdc/0x128 [ 19.237623] __asan_report_load1_noabort+0x20/0x30 [ 19.237676] strnlen+0x80/0x88 [ 19.237719] kasan_strings+0x478/0xb00 [ 19.237763] kunit_try_run_case+0x170/0x3f0 [ 19.237812] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.237865] kthread+0x328/0x630 [ 19.237908] ret_from_fork+0x10/0x20 [ 19.237959] [ 19.237981] Allocated by task 260: [ 19.238010] kasan_save_stack+0x3c/0x68 [ 19.238054] kasan_save_track+0x20/0x40 [ 19.238092] kasan_save_alloc_info+0x40/0x58 [ 19.238162] __kasan_kmalloc+0xd4/0xd8 [ 19.238206] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.238256] kasan_strings+0xc8/0xb00 [ 19.238294] kunit_try_run_case+0x170/0x3f0 [ 19.238340] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.238387] kthread+0x328/0x630 [ 19.238419] ret_from_fork+0x10/0x20 [ 19.238481] [ 19.238501] Freed by task 260: [ 19.238528] kasan_save_stack+0x3c/0x68 [ 19.238577] kasan_save_track+0x20/0x40 [ 19.239155] kasan_save_free_info+0x4c/0x78 [ 19.239595] __kasan_slab_free+0x6c/0x98 [ 19.239742] kfree+0x214/0x3c8 [ 19.239916] kasan_strings+0x24c/0xb00 [ 19.239965] kunit_try_run_case+0x170/0x3f0 [ 19.240005] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.240061] kthread+0x328/0x630 [ 19.240102] ret_from_fork+0x10/0x20 [ 19.240275] [ 19.240423] The buggy address belongs to the object at fff00000c57eabc0 [ 19.240423] which belongs to the cache kmalloc-32 of size 32 [ 19.240639] The buggy address is located 16 bytes inside of [ 19.240639] freed 32-byte region [fff00000c57eabc0, fff00000c57eabe0) [ 19.240721] [ 19.241019] The buggy address belongs to the physical page: [ 19.241137] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ea [ 19.241243] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.241349] page_type: f5(slab) [ 19.241402] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.241735] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.241834] page dumped because: kasan: bad access detected [ 19.241889] [ 19.241911] Memory state around the buggy address: [ 19.241948] fff00000c57eaa80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.242014] fff00000c57eab00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.242331] >fff00000c57eab80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.242687] ^ [ 19.242837] fff00000c57eac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.242966] fff00000c57eac80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.243010] ==================================================================
[ 13.642559] ================================================================== [ 13.643082] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 13.643302] Read of size 1 at addr ffff8881033c1910 by task kunit_try_catch/276 [ 13.643523] [ 13.643615] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.643717] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.643732] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.643753] Call Trace: [ 13.643772] <TASK> [ 13.643791] dump_stack_lvl+0x73/0xb0 [ 13.643819] print_report+0xd1/0x650 [ 13.643841] ? __virt_addr_valid+0x1db/0x2d0 [ 13.643866] ? strnlen+0x73/0x80 [ 13.643883] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.643905] ? strnlen+0x73/0x80 [ 13.643922] kasan_report+0x141/0x180 [ 13.643943] ? strnlen+0x73/0x80 [ 13.643964] __asan_report_load1_noabort+0x18/0x20 [ 13.643988] strnlen+0x73/0x80 [ 13.644005] kasan_strings+0x615/0xe80 [ 13.644038] ? trace_hardirqs_on+0x37/0xe0 [ 13.644061] ? __pfx_kasan_strings+0x10/0x10 [ 13.644081] ? finish_task_switch.isra.0+0x153/0x700 [ 13.644102] ? __switch_to+0x47/0xf50 [ 13.644128] ? __schedule+0x10cc/0x2b60 [ 13.644155] ? __pfx_read_tsc+0x10/0x10 [ 13.644176] ? ktime_get_ts64+0x86/0x230 [ 13.644199] kunit_try_run_case+0x1a5/0x480 [ 13.644223] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.644244] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.644267] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.644289] ? __kthread_parkme+0x82/0x180 [ 13.644311] ? preempt_count_sub+0x50/0x80 [ 13.644334] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.644357] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.644379] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.644401] kthread+0x337/0x6f0 [ 13.644420] ? trace_preempt_on+0x20/0xc0 [ 13.644441] ? __pfx_kthread+0x10/0x10 [ 13.644461] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.644481] ? calculate_sigpending+0x7b/0xa0 [ 13.644505] ? __pfx_kthread+0x10/0x10 [ 13.644526] ret_from_fork+0x116/0x1d0 [ 13.644543] ? __pfx_kthread+0x10/0x10 [ 13.644563] ret_from_fork_asm+0x1a/0x30 [ 13.644594] </TASK> [ 13.644605] [ 13.652803] Allocated by task 276: [ 13.652987] kasan_save_stack+0x45/0x70 [ 13.653189] kasan_save_track+0x18/0x40 [ 13.653378] kasan_save_alloc_info+0x3b/0x50 [ 13.653573] __kasan_kmalloc+0xb7/0xc0 [ 13.653798] __kmalloc_cache_noprof+0x189/0x420 [ 13.654013] kasan_strings+0xc0/0xe80 [ 13.654343] kunit_try_run_case+0x1a5/0x480 [ 13.654488] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.654660] kthread+0x337/0x6f0 [ 13.654825] ret_from_fork+0x116/0x1d0 [ 13.655140] ret_from_fork_asm+0x1a/0x30 [ 13.655339] [ 13.655506] Freed by task 276: [ 13.655740] kasan_save_stack+0x45/0x70 [ 13.656117] kasan_save_track+0x18/0x40 [ 13.656265] kasan_save_free_info+0x3f/0x60 [ 13.656468] __kasan_slab_free+0x56/0x70 [ 13.656666] kfree+0x222/0x3f0 [ 13.656961] kasan_strings+0x2aa/0xe80 [ 13.657186] kunit_try_run_case+0x1a5/0x480 [ 13.657329] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.657549] kthread+0x337/0x6f0 [ 13.657894] ret_from_fork+0x116/0x1d0 [ 13.658229] ret_from_fork_asm+0x1a/0x30 [ 13.658447] [ 13.658534] The buggy address belongs to the object at ffff8881033c1900 [ 13.658534] which belongs to the cache kmalloc-32 of size 32 [ 13.659039] The buggy address is located 16 bytes inside of [ 13.659039] freed 32-byte region [ffff8881033c1900, ffff8881033c1920) [ 13.659588] [ 13.659763] The buggy address belongs to the physical page: [ 13.659959] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033c1 [ 13.660314] flags: 0x200000000000000(node=0|zone=2) [ 13.660588] page_type: f5(slab) [ 13.660991] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.661471] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.661829] page dumped because: kasan: bad access detected [ 13.662137] [ 13.662230] Memory state around the buggy address: [ 13.662533] ffff8881033c1800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.662829] ffff8881033c1880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.663048] >ffff8881033c1900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.663251] ^ [ 13.663487] ffff8881033c1980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.664080] ffff8881033c1a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.664444] ==================================================================