Date
May 15, 2025, 10:38 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 16.311942] ================================================================== [ 16.312369] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 16.313156] Read of size 1 at addr ffff888102b6e290 by task kunit_try_catch/277 [ 16.313640] [ 16.313907] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) [ 16.314020] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.314045] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.314085] Call Trace: [ 16.314152] <TASK> [ 16.314190] dump_stack_lvl+0x73/0xb0 [ 16.314273] print_report+0xd1/0x650 [ 16.314321] ? __virt_addr_valid+0x1db/0x2d0 [ 16.314401] ? strnlen+0x73/0x80 [ 16.314490] ? kasan_complete_mode_report_info+0x64/0x200 [ 16.314542] ? strnlen+0x73/0x80 [ 16.314612] kasan_report+0x141/0x180 [ 16.314669] ? strnlen+0x73/0x80 [ 16.314705] __asan_report_load1_noabort+0x18/0x20 [ 16.314728] strnlen+0x73/0x80 [ 16.314751] kasan_strings+0x615/0xe80 [ 16.314771] ? trace_hardirqs_on+0x37/0xe0 [ 16.314797] ? __pfx_kasan_strings+0x10/0x10 [ 16.314818] ? finish_task_switch.isra.0+0x153/0x700 [ 16.314841] ? __switch_to+0x47/0xf50 [ 16.314867] ? __schedule+0x10cc/0x2b60 [ 16.314890] ? __pfx_read_tsc+0x10/0x10 [ 16.314911] ? ktime_get_ts64+0x86/0x230 [ 16.314936] kunit_try_run_case+0x1a5/0x480 [ 16.314961] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.314983] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.315006] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.315028] ? __kthread_parkme+0x82/0x180 [ 16.315049] ? preempt_count_sub+0x50/0x80 [ 16.315072] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.315094] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.315116] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.315139] kthread+0x337/0x6f0 [ 16.315158] ? trace_preempt_on+0x20/0xc0 [ 16.315179] ? __pfx_kthread+0x10/0x10 [ 16.315200] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.315235] ? calculate_sigpending+0x7b/0xa0 [ 16.315265] ? __pfx_kthread+0x10/0x10 [ 16.315287] ret_from_fork+0x116/0x1d0 [ 16.315305] ? __pfx_kthread+0x10/0x10 [ 16.315326] ret_from_fork_asm+0x1a/0x30 [ 16.315356] </TASK> [ 16.315368] [ 16.327290] Allocated by task 277: [ 16.327642] kasan_save_stack+0x45/0x70 [ 16.327965] kasan_save_track+0x18/0x40 [ 16.328311] kasan_save_alloc_info+0x3b/0x50 [ 16.328563] __kasan_kmalloc+0xb7/0xc0 [ 16.329155] __kmalloc_cache_noprof+0x189/0x420 [ 16.329712] kasan_strings+0xc0/0xe80 [ 16.329880] kunit_try_run_case+0x1a5/0x480 [ 16.330024] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.330193] kthread+0x337/0x6f0 [ 16.330340] ret_from_fork+0x116/0x1d0 [ 16.330677] ret_from_fork_asm+0x1a/0x30 [ 16.330882] [ 16.330987] Freed by task 277: [ 16.331135] kasan_save_stack+0x45/0x70 [ 16.331317] kasan_save_track+0x18/0x40 [ 16.331490] kasan_save_free_info+0x3f/0x60 [ 16.331670] __kasan_slab_free+0x56/0x70 [ 16.332414] kfree+0x222/0x3f0 [ 16.332708] kasan_strings+0x2aa/0xe80 [ 16.333008] kunit_try_run_case+0x1a5/0x480 [ 16.333330] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.333720] kthread+0x337/0x6f0 [ 16.333877] ret_from_fork+0x116/0x1d0 [ 16.334012] ret_from_fork_asm+0x1a/0x30 [ 16.334151] [ 16.335175] The buggy address belongs to the object at ffff888102b6e280 [ 16.335175] which belongs to the cache kmalloc-32 of size 32 [ 16.336300] The buggy address is located 16 bytes inside of [ 16.336300] freed 32-byte region [ffff888102b6e280, ffff888102b6e2a0) [ 16.336695] [ 16.336816] The buggy address belongs to the physical page: [ 16.337179] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b6e [ 16.338209] flags: 0x200000000000000(node=0|zone=2) [ 16.338797] page_type: f5(slab) [ 16.339117] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 16.339527] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.340168] page dumped because: kasan: bad access detected [ 16.340744] [ 16.340949] Memory state around the buggy address: [ 16.341162] ffff888102b6e180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.341677] ffff888102b6e200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.342141] >ffff888102b6e280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.342573] ^ [ 16.342844] ffff888102b6e300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.343423] ffff888102b6e380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.344060] ==================================================================