Date
May 15, 2025, 10:38 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 16.208067] ================================================================== [ 16.209652] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 16.209909] Read of size 1 at addr ffff888102b6e290 by task kunit_try_catch/277 [ 16.210055] [ 16.210133] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) [ 16.210189] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.210202] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.210243] Call Trace: [ 16.210261] <TASK> [ 16.210282] dump_stack_lvl+0x73/0xb0 [ 16.210310] print_report+0xd1/0x650 [ 16.210349] ? __virt_addr_valid+0x1db/0x2d0 [ 16.210381] ? strcmp+0xb0/0xc0 [ 16.210403] ? kasan_complete_mode_report_info+0x64/0x200 [ 16.210429] ? strcmp+0xb0/0xc0 [ 16.210451] kasan_report+0x141/0x180 [ 16.210475] ? strcmp+0xb0/0xc0 [ 16.210501] __asan_report_load1_noabort+0x18/0x20 [ 16.210523] strcmp+0xb0/0xc0 [ 16.210546] kasan_strings+0x431/0xe80 [ 16.210568] ? trace_hardirqs_on+0x37/0xe0 [ 16.210593] ? __pfx_kasan_strings+0x10/0x10 [ 16.210615] ? finish_task_switch.isra.0+0x153/0x700 [ 16.210639] ? __switch_to+0x47/0xf50 [ 16.210666] ? __schedule+0x10cc/0x2b60 [ 16.210690] ? __pfx_read_tsc+0x10/0x10 [ 16.210712] ? ktime_get_ts64+0x86/0x230 [ 16.210737] kunit_try_run_case+0x1a5/0x480 [ 16.210763] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.210785] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.210809] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.210833] ? __kthread_parkme+0x82/0x180 [ 16.210855] ? preempt_count_sub+0x50/0x80 [ 16.210878] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.210902] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.210927] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.210950] kthread+0x337/0x6f0 [ 16.210970] ? trace_preempt_on+0x20/0xc0 [ 16.210993] ? __pfx_kthread+0x10/0x10 [ 16.211015] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.211035] ? calculate_sigpending+0x7b/0xa0 [ 16.211061] ? __pfx_kthread+0x10/0x10 [ 16.211083] ret_from_fork+0x116/0x1d0 [ 16.211102] ? __pfx_kthread+0x10/0x10 [ 16.211123] ret_from_fork_asm+0x1a/0x30 [ 16.211157] </TASK> [ 16.211170] [ 16.224345] Allocated by task 277: [ 16.225079] kasan_save_stack+0x45/0x70 [ 16.225442] kasan_save_track+0x18/0x40 [ 16.225775] kasan_save_alloc_info+0x3b/0x50 [ 16.226065] __kasan_kmalloc+0xb7/0xc0 [ 16.226251] __kmalloc_cache_noprof+0x189/0x420 [ 16.226604] kasan_strings+0xc0/0xe80 [ 16.226903] kunit_try_run_case+0x1a5/0x480 [ 16.227440] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.227843] kthread+0x337/0x6f0 [ 16.228123] ret_from_fork+0x116/0x1d0 [ 16.228429] ret_from_fork_asm+0x1a/0x30 [ 16.228918] [ 16.229128] Freed by task 277: [ 16.229349] kasan_save_stack+0x45/0x70 [ 16.229850] kasan_save_track+0x18/0x40 [ 16.230059] kasan_save_free_info+0x3f/0x60 [ 16.230435] __kasan_slab_free+0x56/0x70 [ 16.231235] kfree+0x222/0x3f0 [ 16.231604] kasan_strings+0x2aa/0xe80 [ 16.231952] kunit_try_run_case+0x1a5/0x480 [ 16.232196] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.232776] kthread+0x337/0x6f0 [ 16.232942] ret_from_fork+0x116/0x1d0 [ 16.233191] ret_from_fork_asm+0x1a/0x30 [ 16.233384] [ 16.233671] The buggy address belongs to the object at ffff888102b6e280 [ 16.233671] which belongs to the cache kmalloc-32 of size 32 [ 16.234098] The buggy address is located 16 bytes inside of [ 16.234098] freed 32-byte region [ffff888102b6e280, ffff888102b6e2a0) [ 16.235060] [ 16.235260] The buggy address belongs to the physical page: [ 16.235496] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b6e [ 16.236193] flags: 0x200000000000000(node=0|zone=2) [ 16.236481] page_type: f5(slab) [ 16.236769] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 16.237076] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.237575] page dumped because: kasan: bad access detected [ 16.237784] [ 16.237945] Memory state around the buggy address: [ 16.238899] ffff888102b6e180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.239429] ffff888102b6e200: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.239912] >ffff888102b6e280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.240396] ^ [ 16.240846] ffff888102b6e300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.241177] ffff888102b6e380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.241745] ==================================================================