Date
July 11, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.026003] ================================================================== [ 19.026282] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 19.026365] Read of size 1 at addr fff00000c5908250 by task kunit_try_catch/260 [ 19.026429] [ 19.026473] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 19.026564] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.026593] Hardware name: linux,dummy-virt (DT) [ 19.026628] Call trace: [ 19.026794] show_stack+0x20/0x38 (C) [ 19.027003] dump_stack_lvl+0x8c/0xd0 [ 19.027131] print_report+0x118/0x608 [ 19.027394] kasan_report+0xdc/0x128 [ 19.027576] __asan_report_load1_noabort+0x20/0x30 [ 19.027721] strcmp+0xc0/0xc8 [ 19.027822] kasan_strings+0x340/0xb00 [ 19.027884] kunit_try_run_case+0x170/0x3f0 [ 19.028147] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.028218] kthread+0x328/0x630 [ 19.028266] ret_from_fork+0x10/0x20 [ 19.028424] [ 19.028466] Allocated by task 260: [ 19.028516] kasan_save_stack+0x3c/0x68 [ 19.028672] kasan_save_track+0x20/0x40 [ 19.028759] kasan_save_alloc_info+0x40/0x58 [ 19.028820] __kasan_kmalloc+0xd4/0xd8 [ 19.028922] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.029013] kasan_strings+0xc8/0xb00 [ 19.029104] kunit_try_run_case+0x170/0x3f0 [ 19.029220] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.029265] kthread+0x328/0x630 [ 19.029419] ret_from_fork+0x10/0x20 [ 19.029564] [ 19.029730] Freed by task 260: [ 19.029851] kasan_save_stack+0x3c/0x68 [ 19.029920] kasan_save_track+0x20/0x40 [ 19.030032] kasan_save_free_info+0x4c/0x78 [ 19.030121] __kasan_slab_free+0x6c/0x98 [ 19.030398] kfree+0x214/0x3c8 [ 19.030585] kasan_strings+0x24c/0xb00 [ 19.030624] kunit_try_run_case+0x170/0x3f0 [ 19.030883] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.031068] kthread+0x328/0x630 [ 19.031364] ret_from_fork+0x10/0x20 [ 19.031594] [ 19.031713] The buggy address belongs to the object at fff00000c5908240 [ 19.031713] which belongs to the cache kmalloc-32 of size 32 [ 19.031956] The buggy address is located 16 bytes inside of [ 19.031956] freed 32-byte region [fff00000c5908240, fff00000c5908260) [ 19.032039] [ 19.032063] The buggy address belongs to the physical page: [ 19.032097] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105908 [ 19.032614] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.032941] page_type: f5(slab) [ 19.033012] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.033179] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.033511] page dumped because: kasan: bad access detected [ 19.033552] [ 19.033705] Memory state around the buggy address: [ 19.033794] fff00000c5908100: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.033924] fff00000c5908180: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 19.033976] >fff00000c5908200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.034123] ^ [ 19.034258] fff00000c5908280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.034303] fff00000c5908300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.034357] ==================================================================
[ 14.322940] ================================================================== [ 14.323945] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.324333] Read of size 1 at addr ffff888102a16ad0 by task kunit_try_catch/276 [ 14.324630] [ 14.324738] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.324782] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.324793] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.324813] Call Trace: [ 14.324825] <TASK> [ 14.324840] dump_stack_lvl+0x73/0xb0 [ 14.324870] print_report+0xd1/0x650 [ 14.324893] ? __virt_addr_valid+0x1db/0x2d0 [ 14.324937] ? strcmp+0xb0/0xc0 [ 14.324954] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.324978] ? strcmp+0xb0/0xc0 [ 14.324994] kasan_report+0x141/0x180 [ 14.325016] ? strcmp+0xb0/0xc0 [ 14.325038] __asan_report_load1_noabort+0x18/0x20 [ 14.325064] strcmp+0xb0/0xc0 [ 14.325222] kasan_strings+0x431/0xe80 [ 14.325246] ? trace_hardirqs_on+0x37/0xe0 [ 14.325270] ? __pfx_kasan_strings+0x10/0x10 [ 14.325291] ? finish_task_switch.isra.0+0x153/0x700 [ 14.325313] ? __switch_to+0x47/0xf50 [ 14.325339] ? __schedule+0x10cc/0x2b60 [ 14.325361] ? __pfx_read_tsc+0x10/0x10 [ 14.325382] ? ktime_get_ts64+0x86/0x230 [ 14.325406] kunit_try_run_case+0x1a5/0x480 [ 14.325430] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.325453] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.325478] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.325501] ? __kthread_parkme+0x82/0x180 [ 14.325520] ? preempt_count_sub+0x50/0x80 [ 14.325544] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.325569] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.325593] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.325619] kthread+0x337/0x6f0 [ 14.325638] ? trace_preempt_on+0x20/0xc0 [ 14.325660] ? __pfx_kthread+0x10/0x10 [ 14.325681] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.325702] ? calculate_sigpending+0x7b/0xa0 [ 14.325726] ? __pfx_kthread+0x10/0x10 [ 14.325748] ret_from_fork+0x116/0x1d0 [ 14.325774] ? __pfx_kthread+0x10/0x10 [ 14.325795] ret_from_fork_asm+0x1a/0x30 [ 14.325827] </TASK> [ 14.325836] [ 14.336458] Allocated by task 276: [ 14.337859] kasan_save_stack+0x45/0x70 [ 14.338036] kasan_save_track+0x18/0x40 [ 14.338176] kasan_save_alloc_info+0x3b/0x50 [ 14.338330] __kasan_kmalloc+0xb7/0xc0 [ 14.338467] __kmalloc_cache_noprof+0x189/0x420 [ 14.338631] kasan_strings+0xc0/0xe80 [ 14.338772] kunit_try_run_case+0x1a5/0x480 [ 14.338931] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.339106] kthread+0x337/0x6f0 [ 14.339227] ret_from_fork+0x116/0x1d0 [ 14.339358] ret_from_fork_asm+0x1a/0x30 [ 14.339496] [ 14.339566] Freed by task 276: [ 14.339678] kasan_save_stack+0x45/0x70 [ 14.339813] kasan_save_track+0x18/0x40 [ 14.340144] kasan_save_free_info+0x3f/0x60 [ 14.341868] __kasan_slab_free+0x56/0x70 [ 14.342399] kfree+0x222/0x3f0 [ 14.342707] kasan_strings+0x2aa/0xe80 [ 14.343167] kunit_try_run_case+0x1a5/0x480 [ 14.343547] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.344228] kthread+0x337/0x6f0 [ 14.344537] ret_from_fork+0x116/0x1d0 [ 14.344907] ret_from_fork_asm+0x1a/0x30 [ 14.345904] [ 14.346266] The buggy address belongs to the object at ffff888102a16ac0 [ 14.346266] which belongs to the cache kmalloc-32 of size 32 [ 14.347739] The buggy address is located 16 bytes inside of [ 14.347739] freed 32-byte region [ffff888102a16ac0, ffff888102a16ae0) [ 14.349150] [ 14.349605] The buggy address belongs to the physical page: [ 14.350306] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a16 [ 14.351297] flags: 0x200000000000000(node=0|zone=2) [ 14.351735] page_type: f5(slab) [ 14.351862] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.352557] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.353408] page dumped because: kasan: bad access detected [ 14.354251] [ 14.354474] Memory state around the buggy address: [ 14.354643] ffff888102a16980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.355358] ffff888102a16a00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.356143] >ffff888102a16a80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.356675] ^ [ 14.356903] ffff888102a16b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.357936] ffff888102a16b80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.358750] ==================================================================