Date
June 24, 2025, 11:37 a.m.
Environment | |
---|---|
dragonboard-845c | |
qemu-x86_64 |
[ 50.627121] ================================================================== [ 50.651273] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 50.657272] Read of size 1 at addr ffff000093781910 by task kunit_try_catch/357 [ 50.664676] [ 50.666206] CPU: 6 UID: 0 PID: 357 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT [ 50.666237] Tainted: [B]=BAD_PAGE, [N]=TEST [ 50.666246] Hardware name: Thundercomm Dragonboard 845c (DT) [ 50.666260] Call trace: [ 50.666268] show_stack+0x20/0x38 (C) [ 50.666287] dump_stack_lvl+0x8c/0xd0 [ 50.666306] print_report+0x118/0x608 [ 50.666325] kasan_report+0xdc/0x128 [ 50.666344] __asan_report_load1_noabort+0x20/0x30 [ 50.666362] strcmp+0xc0/0xc8 [ 50.666376] kasan_strings+0x340/0xb00 [ 50.666392] kunit_try_run_case+0x170/0x3f0 [ 50.666412] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 50.666432] kthread+0x328/0x630 [ 50.666446] ret_from_fork+0x10/0x20 [ 50.666465] [ 50.734709] Allocated by task 357: [ 50.738164] kasan_save_stack+0x3c/0x68 [ 50.742071] kasan_save_track+0x20/0x40 [ 50.745976] kasan_save_alloc_info+0x40/0x58 [ 50.750309] __kasan_kmalloc+0xd4/0xd8 [ 50.754123] __kmalloc_cache_noprof+0x16c/0x3c0 [ 50.758724] kasan_strings+0xc8/0xb00 [ 50.762451] kunit_try_run_case+0x170/0x3f0 [ 50.766699] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 50.772260] kthread+0x328/0x630 [ 50.775542] ret_from_fork+0x10/0x20 [ 50.779175] [ 50.780705] Freed by task 357: [ 50.783813] kasan_save_stack+0x3c/0x68 [ 50.787716] kasan_save_track+0x20/0x40 [ 50.791619] kasan_save_free_info+0x4c/0x78 [ 50.795865] __kasan_slab_free+0x6c/0x98 [ 50.799856] kfree+0x214/0x3c8 [ 50.802968] kasan_strings+0x24c/0xb00 [ 50.806781] kunit_try_run_case+0x170/0x3f0 [ 50.811030] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 50.816589] kthread+0x328/0x630 [ 50.819871] ret_from_fork+0x10/0x20 [ 50.823502] [ 50.825025] The buggy address belongs to the object at ffff000093781900 [ 50.825025] which belongs to the cache kmalloc-32 of size 32 [ 50.837503] The buggy address is located 16 bytes inside of [ 50.837503] freed 32-byte region [ffff000093781900, ffff000093781920) [ 50.849722] [ 50.851253] The buggy address belongs to the physical page: [ 50.856894] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113781 [ 50.864994] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 50.871604] page_type: f5(slab) [ 50.874806] raw: 0bfffe0000000000 ffff000080002780 dead000000000122 0000000000000000 [ 50.882647] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 50.890483] page dumped because: kasan: bad access detected [ 50.896120] [ 50.897643] Memory state around the buggy address: [ 50.902494] ffff000093781800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 50.909809] ffff000093781880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 50.917123] >ffff000093781900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 50.924435] ^ [ 50.928244] ffff000093781980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 50.935561] ffff000093781a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 50.942866] ==================================================================
[ 31.626261] ================================================================== [ 31.628209] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 31.628620] Read of size 1 at addr ffff888103b4da50 by task kunit_try_catch/289 [ 31.629302] [ 31.629535] CPU: 1 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT(voluntary) [ 31.629761] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.629795] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.629845] Call Trace: [ 31.629875] <TASK> [ 31.629913] dump_stack_lvl+0x73/0xb0 [ 31.629990] print_report+0xd1/0x650 [ 31.630051] ? __virt_addr_valid+0x1db/0x2d0 [ 31.630118] ? strcmp+0xb0/0xc0 [ 31.630172] ? kasan_complete_mode_report_info+0x64/0x200 [ 31.630237] ? strcmp+0xb0/0xc0 [ 31.630281] kasan_report+0x141/0x180 [ 31.630339] ? strcmp+0xb0/0xc0 [ 31.630395] __asan_report_load1_noabort+0x18/0x20 [ 31.630460] strcmp+0xb0/0xc0 [ 31.630511] kasan_strings+0x431/0xe80 [ 31.630683] ? trace_hardirqs_on+0x37/0xe0 [ 31.630758] ? __pfx_kasan_strings+0x10/0x10 [ 31.630813] ? finish_task_switch.isra.0+0x153/0x700 [ 31.630876] ? __switch_to+0x47/0xf50 [ 31.630920] ? __schedule+0x10cc/0x2b60 [ 31.630957] ? __pfx_read_tsc+0x10/0x10 [ 31.630987] ? ktime_get_ts64+0x86/0x230 [ 31.631020] kunit_try_run_case+0x1a5/0x480 [ 31.631056] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.631138] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 31.631187] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.631221] ? __kthread_parkme+0x82/0x180 [ 31.631250] ? preempt_count_sub+0x50/0x80 [ 31.631281] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.631313] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.631344] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.631376] kthread+0x337/0x6f0 [ 31.631403] ? trace_preempt_on+0x20/0xc0 [ 31.631434] ? __pfx_kthread+0x10/0x10 [ 31.631460] ? _raw_spin_unlock_irq+0x47/0x80 [ 31.631489] ? calculate_sigpending+0x7b/0xa0 [ 31.631520] ? __pfx_kthread+0x10/0x10 [ 31.631572] ret_from_fork+0x116/0x1d0 [ 31.631600] ? __pfx_kthread+0x10/0x10 [ 31.631638] ret_from_fork_asm+0x1a/0x30 [ 31.631691] </TASK> [ 31.631708] [ 31.648259] Allocated by task 289: [ 31.648748] kasan_save_stack+0x45/0x70 [ 31.649584] kasan_save_track+0x18/0x40 [ 31.650033] kasan_save_alloc_info+0x3b/0x50 [ 31.650499] __kasan_kmalloc+0xb7/0xc0 [ 31.650994] __kmalloc_cache_noprof+0x189/0x420 [ 31.651711] kasan_strings+0xc0/0xe80 [ 31.652221] kunit_try_run_case+0x1a5/0x480 [ 31.652767] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.653342] kthread+0x337/0x6f0 [ 31.653733] ret_from_fork+0x116/0x1d0 [ 31.654300] ret_from_fork_asm+0x1a/0x30 [ 31.654734] [ 31.654944] Freed by task 289: [ 31.655261] kasan_save_stack+0x45/0x70 [ 31.655629] kasan_save_track+0x18/0x40 [ 31.656031] kasan_save_free_info+0x3f/0x60 [ 31.656465] __kasan_slab_free+0x56/0x70 [ 31.656876] kfree+0x222/0x3f0 [ 31.657263] kasan_strings+0x2aa/0xe80 [ 31.657759] kunit_try_run_case+0x1a5/0x480 [ 31.658345] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.658917] kthread+0x337/0x6f0 [ 31.659400] ret_from_fork+0x116/0x1d0 [ 31.659810] ret_from_fork_asm+0x1a/0x30 [ 31.660194] [ 31.660399] The buggy address belongs to the object at ffff888103b4da40 [ 31.660399] which belongs to the cache kmalloc-32 of size 32 [ 31.661666] The buggy address is located 16 bytes inside of [ 31.661666] freed 32-byte region [ffff888103b4da40, ffff888103b4da60) [ 31.662876] [ 31.663201] The buggy address belongs to the physical page: [ 31.663685] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b4d [ 31.664453] flags: 0x200000000000000(node=0|zone=2) [ 31.664872] page_type: f5(slab) [ 31.665432] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 31.666322] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.666524] page dumped because: kasan: bad access detected [ 31.667013] [ 31.667360] Memory state around the buggy address: [ 31.667745] ffff888103b4d900: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.668458] ffff888103b4d980: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.669316] >ffff888103b4da00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.670097] ^ [ 31.670651] ffff888103b4da80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.671041] ffff888103b4db00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.671993] ==================================================================