Date
June 17, 2025, 3:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 24.669201] ================================================================== [ 24.669382] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 24.669615] Read of size 1 at addr fff00000c73a8610 by task kunit_try_catch/261 [ 24.669749] [ 24.669834] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.3-rc1 #1 PREEMPT [ 24.670021] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.670124] Hardware name: linux,dummy-virt (DT) [ 24.670202] Call trace: [ 24.670269] show_stack+0x20/0x38 (C) [ 24.670512] dump_stack_lvl+0x8c/0xd0 [ 24.670671] print_report+0x118/0x608 [ 24.670801] kasan_report+0xdc/0x128 [ 24.670926] __asan_report_load1_noabort+0x20/0x30 [ 24.671060] strnlen+0x80/0x88 [ 24.671186] kasan_strings+0x478/0xb00 [ 24.671329] kunit_try_run_case+0x170/0x3f0 [ 24.671527] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 24.671756] kthread+0x328/0x630 [ 24.671960] ret_from_fork+0x10/0x20 [ 24.672912] __kasan_kmalloc+0xd4/0xd8 [ 24.674265] __kasan_slab_free+0x6c/0x98 [ 24.675086] [ 24.675328] The buggy address is located 16 bytes inside of [ 24.675328] freed 32-byte region [fff00000c73a8600, fff00000c73a8620) [ 24.676245] >fff00000c73a8600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 24.676289] ^ [ 24.676373] fff00000c73a8700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 24.676417] ==================================================================
[ 22.525506] ================================================================== [ 22.526243] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 22.526879] Read of size 1 at addr ffff888102ef0050 by task kunit_try_catch/279 [ 22.528674] [ 22.528901] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G B N 6.15.3-rc1 #1 PREEMPT(voluntary) [ 22.530668] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.530714] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.531198] Call Trace: [ 22.531248] <TASK> [ 22.531323] dump_stack_lvl+0x73/0xb0 [ 22.531392] print_report+0xd1/0x650 [ 22.531455] ? __virt_addr_valid+0x1db/0x2d0 [ 22.531509] ? strnlen+0x73/0x80 [ 22.531555] ? kasan_complete_mode_report_info+0x64/0x200 [ 22.531611] ? strnlen+0x73/0x80 [ 22.531658] kasan_report+0x141/0x180 [ 22.531711] ? strnlen+0x73/0x80 [ 22.531767] __asan_report_load1_noabort+0x18/0x20 [ 22.531818] strnlen+0x73/0x80 [ 22.532391] kasan_strings+0x615/0xe80 [ 22.532464] ? trace_hardirqs_on+0x37/0xe0 [ 22.532568] ? __pfx_kasan_strings+0x10/0x10 [ 22.532625] ? finish_task_switch.isra.0+0x153/0x700 [ 22.532678] ? __switch_to+0x5d9/0xf60 [ 22.532725] ? dequeue_task_fair+0x166/0x4e0 [ 22.532781] ? __schedule+0x10cc/0x2b60 [ 22.532834] ? __pfx_read_tsc+0x10/0x10 [ 22.532883] ? ktime_get_ts64+0x86/0x230 [ 22.532953] kunit_try_run_case+0x1a5/0x480 [ 22.533023] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.533080] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.533137] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.533193] ? __kthread_parkme+0x82/0x180 [ 22.533245] ? preempt_count_sub+0x50/0x80 [ 22.533328] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.533388] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.533446] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.533502] kthread+0x337/0x6f0 [ 22.533555] ? trace_preempt_on+0x20/0xc0 [ 22.533615] ? __pfx_kthread+0x10/0x10 [ 22.533658] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.533709] ? calculate_sigpending+0x7b/0xa0 [ 22.533760] ? __pfx_kthread+0x10/0x10 [ 22.533805] ret_from_fork+0x41/0x80 [ 22.533856] ? __pfx_kthread+0x10/0x10 [ 22.534340] ret_from_fork_asm+0x1a/0x30 [ 22.534450] </TASK> [ 22.534491] [ 22.554940] Allocated by task 279: [ 22.555589] kasan_save_stack+0x45/0x70 [ 22.556149] kasan_save_track+0x18/0x40 [ 22.556560] kasan_save_alloc_info+0x3b/0x50 [ 22.557185] __kasan_kmalloc+0xb7/0xc0 [ 22.557598] __kmalloc_cache_noprof+0x189/0x420 [ 22.558546] kasan_strings+0xc0/0xe80 [ 22.558929] kunit_try_run_case+0x1a5/0x480 [ 22.559619] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.560389] kthread+0x337/0x6f0 [ 22.560794] ret_from_fork+0x41/0x80 [ 22.561420] ret_from_fork_asm+0x1a/0x30 [ 22.561737] [ 22.562453] Freed by task 279: [ 22.562824] kasan_save_stack+0x45/0x70 [ 22.563593] kasan_save_track+0x18/0x40 [ 22.563982] kasan_save_free_info+0x3f/0x60 [ 22.564334] __kasan_slab_free+0x56/0x70 [ 22.564656] kfree+0x222/0x3f0 [ 22.564925] kasan_strings+0x2aa/0xe80 [ 22.565218] kunit_try_run_case+0x1a5/0x480 [ 22.566358] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.566750] kthread+0x337/0x6f0 [ 22.567794] ret_from_fork+0x41/0x80 [ 22.568270] ret_from_fork_asm+0x1a/0x30 [ 22.568818] [ 22.569443] The buggy address belongs to the object at ffff888102ef0040 [ 22.569443] which belongs to the cache kmalloc-32 of size 32 [ 22.571200] The buggy address is located 16 bytes inside of [ 22.571200] freed 32-byte region [ffff888102ef0040, ffff888102ef0060) [ 22.572742] [ 22.573001] The buggy address belongs to the physical page: [ 22.573799] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ef0 [ 22.575350] flags: 0x200000000000000(node=0|zone=2) [ 22.575823] page_type: f5(slab) [ 22.576147] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 22.576812] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 22.577462] page dumped because: kasan: bad access detected [ 22.578090] [ 22.578591] Memory state around the buggy address: [ 22.579658] ffff888102eeff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.580406] ffff888102eeff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.581036] >ffff888102ef0000: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.581735] ^ [ 22.582216] ffff888102ef0080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 22.583036] ffff888102ef0100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.584513] ==================================================================