Date
July 15, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.146906] ================================================================== [ 20.146966] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 20.147016] Read of size 1 at addr fff00000c59caad0 by task kunit_try_catch/261 [ 20.147068] [ 20.147491] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT [ 20.147806] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.147879] Hardware name: linux,dummy-virt (DT) [ 20.147916] Call trace: [ 20.148079] show_stack+0x20/0x38 (C) [ 20.148143] dump_stack_lvl+0x8c/0xd0 [ 20.148195] print_report+0x118/0x5d0 [ 20.148504] kasan_report+0xdc/0x128 [ 20.148596] __asan_report_load1_noabort+0x20/0x30 [ 20.148732] strnlen+0x80/0x88 [ 20.148799] kasan_strings+0x478/0xb00 [ 20.148861] kunit_try_run_case+0x170/0x3f0 [ 20.148921] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.148978] kthread+0x328/0x630 [ 20.149027] ret_from_fork+0x10/0x20 [ 20.149319] [ 20.149487] Allocated by task 261: [ 20.149789] kasan_save_stack+0x3c/0x68 [ 20.149857] kasan_save_track+0x20/0x40 [ 20.149987] kasan_save_alloc_info+0x40/0x58 [ 20.150066] __kasan_kmalloc+0xd4/0xd8 [ 20.150225] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.150291] kasan_strings+0xc8/0xb00 [ 20.150585] kunit_try_run_case+0x170/0x3f0 [ 20.150801] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.150880] kthread+0x328/0x630 [ 20.150971] ret_from_fork+0x10/0x20 [ 20.151013] [ 20.151035] Freed by task 261: [ 20.151064] kasan_save_stack+0x3c/0x68 [ 20.151103] kasan_save_track+0x20/0x40 [ 20.151152] kasan_save_free_info+0x4c/0x78 [ 20.151199] __kasan_slab_free+0x6c/0x98 [ 20.151249] kfree+0x214/0x3c8 [ 20.151296] kasan_strings+0x24c/0xb00 [ 20.151335] kunit_try_run_case+0x170/0x3f0 [ 20.151377] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.151433] kthread+0x328/0x630 [ 20.151479] ret_from_fork+0x10/0x20 [ 20.151532] [ 20.151554] The buggy address belongs to the object at fff00000c59caac0 [ 20.151554] which belongs to the cache kmalloc-32 of size 32 [ 20.151617] The buggy address is located 16 bytes inside of [ 20.151617] freed 32-byte region [fff00000c59caac0, fff00000c59caae0) [ 20.151689] [ 20.151736] The buggy address belongs to the physical page: [ 20.151789] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059ca [ 20.151844] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.151894] page_type: f5(slab) [ 20.151944] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.152006] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.152059] page dumped because: kasan: bad access detected [ 20.152094] [ 20.152124] Memory state around the buggy address: [ 20.152159] fff00000c59ca980: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.152217] fff00000c59caa00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.152272] >fff00000c59caa80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.152314] ^ [ 20.152367] fff00000c59cab00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.152427] fff00000c59cab80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.152467] ==================================================================
[ 12.973432] ================================================================== [ 12.973661] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 12.973959] Read of size 1 at addr ffff8881022482d0 by task kunit_try_catch/278 [ 12.974348] [ 12.974453] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT(voluntary) [ 12.974493] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.974504] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.974523] Call Trace: [ 12.974536] <TASK> [ 12.974548] dump_stack_lvl+0x73/0xb0 [ 12.974570] print_report+0xd1/0x610 [ 12.974592] ? __virt_addr_valid+0x1db/0x2d0 [ 12.974612] ? strnlen+0x73/0x80 [ 12.974630] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.974652] ? strnlen+0x73/0x80 [ 12.974671] kasan_report+0x141/0x180 [ 12.974728] ? strnlen+0x73/0x80 [ 12.974753] __asan_report_load1_noabort+0x18/0x20 [ 12.974773] strnlen+0x73/0x80 [ 12.974792] kasan_strings+0x615/0xe80 [ 12.974813] ? trace_hardirqs_on+0x37/0xe0 [ 12.974835] ? __pfx_kasan_strings+0x10/0x10 [ 12.974855] ? finish_task_switch.isra.0+0x153/0x700 [ 12.974877] ? __switch_to+0x5d9/0xf60 [ 12.974905] ? dequeue_task_fair+0x166/0x4e0 [ 12.974929] ? __schedule+0x10cc/0x2b60 [ 12.974951] ? __pfx_read_tsc+0x10/0x10 [ 12.974970] ? ktime_get_ts64+0x86/0x230 [ 12.974993] kunit_try_run_case+0x1a5/0x480 [ 12.975013] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.975031] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.975053] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.975075] ? __kthread_parkme+0x82/0x180 [ 12.975096] ? preempt_count_sub+0x50/0x80 [ 12.975119] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.975140] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.975161] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.975185] kthread+0x337/0x6f0 [ 12.975200] ? trace_preempt_on+0x20/0xc0 [ 12.975222] ? __pfx_kthread+0x10/0x10 [ 12.975239] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.975260] ? calculate_sigpending+0x7b/0xa0 [ 12.975281] ? __pfx_kthread+0x10/0x10 [ 12.975298] ret_from_fork+0x41/0x80 [ 12.975317] ? __pfx_kthread+0x10/0x10 [ 12.975334] ret_from_fork_asm+0x1a/0x30 [ 12.975363] </TASK> [ 12.975372] [ 12.983494] Allocated by task 278: [ 12.983638] kasan_save_stack+0x45/0x70 [ 12.983779] kasan_save_track+0x18/0x40 [ 12.983922] kasan_save_alloc_info+0x3b/0x50 [ 12.984064] __kasan_kmalloc+0xb7/0xc0 [ 12.984193] __kmalloc_cache_noprof+0x189/0x420 [ 12.984342] kasan_strings+0xc0/0xe80 [ 12.984470] kunit_try_run_case+0x1a5/0x480 [ 12.984609] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.984949] kthread+0x337/0x6f0 [ 12.985115] ret_from_fork+0x41/0x80 [ 12.985300] ret_from_fork_asm+0x1a/0x30 [ 12.985491] [ 12.985581] Freed by task 278: [ 12.985752] kasan_save_stack+0x45/0x70 [ 12.986183] kasan_save_track+0x18/0x40 [ 12.986392] kasan_save_free_info+0x3f/0x60 [ 12.986592] __kasan_slab_free+0x56/0x70 [ 12.986987] kfree+0x222/0x3f0 [ 12.987128] kasan_strings+0x2aa/0xe80 [ 12.987259] kunit_try_run_case+0x1a5/0x480 [ 12.987398] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.987569] kthread+0x337/0x6f0 [ 12.987683] ret_from_fork+0x41/0x80 [ 12.988924] ret_from_fork_asm+0x1a/0x30 [ 12.989144] [ 12.989240] The buggy address belongs to the object at ffff8881022482c0 [ 12.989240] which belongs to the cache kmalloc-32 of size 32 [ 12.989759] The buggy address is located 16 bytes inside of [ 12.989759] freed 32-byte region [ffff8881022482c0, ffff8881022482e0) [ 12.990719] [ 12.990790] The buggy address belongs to the physical page: [ 12.991541] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102248 [ 12.992481] flags: 0x200000000000000(node=0|zone=2) [ 12.993149] page_type: f5(slab) [ 12.993645] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.994345] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.994899] page dumped because: kasan: bad access detected [ 12.995144] [ 12.995235] Memory state around the buggy address: [ 12.995448] ffff888102248180: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc [ 12.996059] ffff888102248200: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.996581] >ffff888102248280: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.997518] ^ [ 12.998259] ffff888102248300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.998586] ffff888102248380: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.999100] ==================================================================