Date
July 2, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.442728] ================================================================== [ 20.442938] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 20.443018] Read of size 1 at addr fff00000c58a9390 by task kunit_try_catch/259 [ 20.443073] [ 20.443277] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.443452] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.443635] Hardware name: linux,dummy-virt (DT) [ 20.443720] Call trace: [ 20.443747] show_stack+0x20/0x38 (C) [ 20.443831] dump_stack_lvl+0x8c/0xd0 [ 20.444018] print_report+0x118/0x608 [ 20.444153] kasan_report+0xdc/0x128 [ 20.444314] __asan_report_load1_noabort+0x20/0x30 [ 20.444481] strlen+0xa8/0xb0 [ 20.444548] kasan_strings+0x418/0xb00 [ 20.444655] kunit_try_run_case+0x170/0x3f0 [ 20.444718] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.444923] kthread+0x328/0x630 [ 20.445134] ret_from_fork+0x10/0x20 [ 20.445237] [ 20.445363] Allocated by task 259: [ 20.445433] kasan_save_stack+0x3c/0x68 [ 20.445564] kasan_save_track+0x20/0x40 [ 20.445633] kasan_save_alloc_info+0x40/0x58 [ 20.445862] __kasan_kmalloc+0xd4/0xd8 [ 20.446097] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.446426] kasan_strings+0xc8/0xb00 [ 20.446487] kunit_try_run_case+0x170/0x3f0 [ 20.446755] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.446971] kthread+0x328/0x630 [ 20.447075] ret_from_fork+0x10/0x20 [ 20.447152] [ 20.447182] Freed by task 259: [ 20.447271] kasan_save_stack+0x3c/0x68 [ 20.447313] kasan_save_track+0x20/0x40 [ 20.447362] kasan_save_free_info+0x4c/0x78 [ 20.447405] __kasan_slab_free+0x6c/0x98 [ 20.447443] kfree+0x214/0x3c8 [ 20.447487] kasan_strings+0x24c/0xb00 [ 20.447524] kunit_try_run_case+0x170/0x3f0 [ 20.447593] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.447647] kthread+0x328/0x630 [ 20.447734] ret_from_fork+0x10/0x20 [ 20.447799] [ 20.447829] The buggy address belongs to the object at fff00000c58a9380 [ 20.447829] which belongs to the cache kmalloc-32 of size 32 [ 20.447890] The buggy address is located 16 bytes inside of [ 20.447890] freed 32-byte region [fff00000c58a9380, fff00000c58a93a0) [ 20.447972] [ 20.448003] The buggy address belongs to the physical page: [ 20.448055] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9 [ 20.448131] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.448208] page_type: f5(slab) [ 20.448256] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.448310] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.448353] page dumped because: kasan: bad access detected [ 20.448396] [ 20.448416] Memory state around the buggy address: [ 20.448450] fff00000c58a9280: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.448507] fff00000c58a9300: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.448554] >fff00000c58a9380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.448951] ^ [ 20.449224] fff00000c58a9400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.449343] fff00000c58a9480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.449432] ==================================================================
[ 13.405319] ================================================================== [ 13.405657] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.406082] Read of size 1 at addr ffff888103988590 by task kunit_try_catch/278 [ 13.406336] [ 13.406445] CPU: 1 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.406489] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.406500] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.406521] Call Trace: [ 13.406536] <TASK> [ 13.406552] dump_stack_lvl+0x73/0xb0 [ 13.406578] print_report+0xd1/0x650 [ 13.406600] ? __virt_addr_valid+0x1db/0x2d0 [ 13.406622] ? strlen+0x8f/0xb0 [ 13.406638] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.406661] ? strlen+0x8f/0xb0 [ 13.406677] kasan_report+0x141/0x180 [ 13.406699] ? strlen+0x8f/0xb0 [ 13.406720] __asan_report_load1_noabort+0x18/0x20 [ 13.406743] strlen+0x8f/0xb0 [ 13.406760] kasan_strings+0x57b/0xe80 [ 13.406779] ? trace_hardirqs_on+0x37/0xe0 [ 13.406802] ? __pfx_kasan_strings+0x10/0x10 [ 13.406821] ? finish_task_switch.isra.0+0x153/0x700 [ 13.406843] ? __switch_to+0x47/0xf50 [ 13.406868] ? __schedule+0x10cc/0x2b60 [ 13.406889] ? __pfx_read_tsc+0x10/0x10 [ 13.406909] ? ktime_get_ts64+0x86/0x230 [ 13.406932] kunit_try_run_case+0x1a5/0x480 [ 13.406955] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.406978] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.407001] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.407023] ? __kthread_parkme+0x82/0x180 [ 13.407043] ? preempt_count_sub+0x50/0x80 [ 13.407065] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.407088] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.407110] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.407132] kthread+0x337/0x6f0 [ 13.407151] ? trace_preempt_on+0x20/0xc0 [ 13.407172] ? __pfx_kthread+0x10/0x10 [ 13.407192] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.407212] ? calculate_sigpending+0x7b/0xa0 [ 13.407235] ? __pfx_kthread+0x10/0x10 [ 13.407256] ret_from_fork+0x116/0x1d0 [ 13.407274] ? __pfx_kthread+0x10/0x10 [ 13.407293] ret_from_fork_asm+0x1a/0x30 [ 13.407322] </TASK> [ 13.407333] [ 13.418044] Allocated by task 278: [ 13.418646] kasan_save_stack+0x45/0x70 [ 13.419280] kasan_save_track+0x18/0x40 [ 13.419783] kasan_save_alloc_info+0x3b/0x50 [ 13.420269] __kasan_kmalloc+0xb7/0xc0 [ 13.420432] __kmalloc_cache_noprof+0x189/0x420 [ 13.420586] kasan_strings+0xc0/0xe80 [ 13.420714] kunit_try_run_case+0x1a5/0x480 [ 13.421569] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.422316] kthread+0x337/0x6f0 [ 13.422949] ret_from_fork+0x116/0x1d0 [ 13.423486] ret_from_fork_asm+0x1a/0x30 [ 13.424105] [ 13.424194] Freed by task 278: [ 13.424309] kasan_save_stack+0x45/0x70 [ 13.425015] kasan_save_track+0x18/0x40 [ 13.425658] kasan_save_free_info+0x3f/0x60 [ 13.426131] __kasan_slab_free+0x56/0x70 [ 13.426281] kfree+0x222/0x3f0 [ 13.426411] kasan_strings+0x2aa/0xe80 [ 13.426543] kunit_try_run_case+0x1a5/0x480 [ 13.426686] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.427725] kthread+0x337/0x6f0 [ 13.428178] ret_from_fork+0x116/0x1d0 [ 13.428905] ret_from_fork_asm+0x1a/0x30 [ 13.429473] [ 13.429824] The buggy address belongs to the object at ffff888103988580 [ 13.429824] which belongs to the cache kmalloc-32 of size 32 [ 13.431048] The buggy address is located 16 bytes inside of [ 13.431048] freed 32-byte region [ffff888103988580, ffff8881039885a0) [ 13.431659] [ 13.432010] The buggy address belongs to the physical page: [ 13.432662] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103988 [ 13.433627] flags: 0x200000000000000(node=0|zone=2) [ 13.434037] page_type: f5(slab) [ 13.434165] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.434591] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.435551] page dumped because: kasan: bad access detected [ 13.436220] [ 13.436545] Memory state around the buggy address: [ 13.436903] ffff888103988480: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.437127] ffff888103988500: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.437342] >ffff888103988580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.438377] ^ [ 13.438894] ffff888103988600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.439520] ffff888103988680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.440154] ==================================================================