Date
July 1, 2025, 12:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.688609] ================================================================== [ 19.688710] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 19.688792] Read of size 1 at addr fff00000c79f3950 by task kunit_try_catch/259 [ 19.688846] [ 19.688881] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.689060] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.689205] Hardware name: linux,dummy-virt (DT) [ 19.689311] Call trace: [ 19.689458] show_stack+0x20/0x38 (C) [ 19.689523] dump_stack_lvl+0x8c/0xd0 [ 19.689572] print_report+0x118/0x608 [ 19.689663] kasan_report+0xdc/0x128 [ 19.689785] __asan_report_load1_noabort+0x20/0x30 [ 19.689841] strcmp+0xc0/0xc8 [ 19.689894] kasan_strings+0x340/0xb00 [ 19.690008] kunit_try_run_case+0x170/0x3f0 [ 19.690059] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.690112] kthread+0x328/0x630 [ 19.690339] ret_from_fork+0x10/0x20 [ 19.690496] [ 19.690559] Allocated by task 259: [ 19.690648] kasan_save_stack+0x3c/0x68 [ 19.690703] kasan_save_track+0x20/0x40 [ 19.690816] kasan_save_alloc_info+0x40/0x58 [ 19.690859] __kasan_kmalloc+0xd4/0xd8 [ 19.690941] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.691036] kasan_strings+0xc8/0xb00 [ 19.691169] kunit_try_run_case+0x170/0x3f0 [ 19.691288] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.691477] kthread+0x328/0x630 [ 19.691513] ret_from_fork+0x10/0x20 [ 19.691550] [ 19.691572] Freed by task 259: [ 19.691599] kasan_save_stack+0x3c/0x68 [ 19.691641] kasan_save_track+0x20/0x40 [ 19.691953] kasan_save_free_info+0x4c/0x78 [ 19.692186] __kasan_slab_free+0x6c/0x98 [ 19.692283] kfree+0x214/0x3c8 [ 19.692366] kasan_strings+0x24c/0xb00 [ 19.692594] kunit_try_run_case+0x170/0x3f0 [ 19.692737] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.692841] kthread+0x328/0x630 [ 19.692875] ret_from_fork+0x10/0x20 [ 19.693254] [ 19.693351] The buggy address belongs to the object at fff00000c79f3940 [ 19.693351] which belongs to the cache kmalloc-32 of size 32 [ 19.693481] The buggy address is located 16 bytes inside of [ 19.693481] freed 32-byte region [fff00000c79f3940, fff00000c79f3960) [ 19.693963] [ 19.694062] The buggy address belongs to the physical page: [ 19.694217] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079f3 [ 19.694335] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.694483] page_type: f5(slab) [ 19.694576] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.694640] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.694704] page dumped because: kasan: bad access detected [ 19.694973] [ 19.695057] Memory state around the buggy address: [ 19.695161] fff00000c79f3800: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.695256] fff00000c79f3880: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 19.695310] >fff00000c79f3900: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.695456] ^ [ 19.695532] fff00000c79f3980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.695651] fff00000c79f3a00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.695777] ==================================================================
[ 13.333171] ================================================================== [ 13.335097] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 13.335603] Read of size 1 at addr ffff888103124410 by task kunit_try_catch/276 [ 13.335836] [ 13.335929] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.335976] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.335988] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.336010] Call Trace: [ 13.336022] <TASK> [ 13.336051] dump_stack_lvl+0x73/0xb0 [ 13.336078] print_report+0xd1/0x650 [ 13.336104] ? __virt_addr_valid+0x1db/0x2d0 [ 13.336127] ? strcmp+0xb0/0xc0 [ 13.336147] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.336192] ? strcmp+0xb0/0xc0 [ 13.336213] kasan_report+0x141/0x180 [ 13.336249] ? strcmp+0xb0/0xc0 [ 13.336273] __asan_report_load1_noabort+0x18/0x20 [ 13.336298] strcmp+0xb0/0xc0 [ 13.336333] kasan_strings+0x431/0xe80 [ 13.336365] ? trace_hardirqs_on+0x37/0xe0 [ 13.336402] ? __pfx_kasan_strings+0x10/0x10 [ 13.336422] ? finish_task_switch.isra.0+0x153/0x700 [ 13.336445] ? __switch_to+0x47/0xf50 [ 13.336471] ? __schedule+0x10cc/0x2b60 [ 13.336493] ? __pfx_read_tsc+0x10/0x10 [ 13.336514] ? ktime_get_ts64+0x86/0x230 [ 13.336537] kunit_try_run_case+0x1a5/0x480 [ 13.336562] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.336583] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.336606] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.336628] ? __kthread_parkme+0x82/0x180 [ 13.336649] ? preempt_count_sub+0x50/0x80 [ 13.336671] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.336695] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.336716] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.336738] kthread+0x337/0x6f0 [ 13.336756] ? trace_preempt_on+0x20/0xc0 [ 13.336776] ? __pfx_kthread+0x10/0x10 [ 13.336796] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.336832] ? calculate_sigpending+0x7b/0xa0 [ 13.336856] ? __pfx_kthread+0x10/0x10 [ 13.336890] ret_from_fork+0x116/0x1d0 [ 13.336920] ? __pfx_kthread+0x10/0x10 [ 13.336940] ret_from_fork_asm+0x1a/0x30 [ 13.336983] </TASK> [ 13.336994] [ 13.345461] Allocated by task 276: [ 13.345725] kasan_save_stack+0x45/0x70 [ 13.345932] kasan_save_track+0x18/0x40 [ 13.346123] kasan_save_alloc_info+0x3b/0x50 [ 13.346799] __kasan_kmalloc+0xb7/0xc0 [ 13.346988] __kmalloc_cache_noprof+0x189/0x420 [ 13.347503] kasan_strings+0xc0/0xe80 [ 13.347656] kunit_try_run_case+0x1a5/0x480 [ 13.347826] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.348062] kthread+0x337/0x6f0 [ 13.348178] ret_from_fork+0x116/0x1d0 [ 13.348475] ret_from_fork_asm+0x1a/0x30 [ 13.348796] [ 13.349099] Freed by task 276: [ 13.349551] kasan_save_stack+0x45/0x70 [ 13.349750] kasan_save_track+0x18/0x40 [ 13.350133] kasan_save_free_info+0x3f/0x60 [ 13.350346] __kasan_slab_free+0x56/0x70 [ 13.350626] kfree+0x222/0x3f0 [ 13.350754] kasan_strings+0x2aa/0xe80 [ 13.351038] kunit_try_run_case+0x1a5/0x480 [ 13.351424] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.351722] kthread+0x337/0x6f0 [ 13.351970] ret_from_fork+0x116/0x1d0 [ 13.352178] ret_from_fork_asm+0x1a/0x30 [ 13.352425] [ 13.352689] The buggy address belongs to the object at ffff888103124400 [ 13.352689] which belongs to the cache kmalloc-32 of size 32 [ 13.353398] The buggy address is located 16 bytes inside of [ 13.353398] freed 32-byte region [ffff888103124400, ffff888103124420) [ 13.354053] [ 13.354135] The buggy address belongs to the physical page: [ 13.354410] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103124 [ 13.354923] flags: 0x200000000000000(node=0|zone=2) [ 13.355268] page_type: f5(slab) [ 13.355526] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.355809] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.356294] page dumped because: kasan: bad access detected [ 13.356636] [ 13.356789] Memory state around the buggy address: [ 13.357249] ffff888103124300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.357790] ffff888103124380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.358084] >ffff888103124400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.358340] ^ [ 13.358604] ffff888103124480: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.359023] ffff888103124500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.359444] ==================================================================