Date
July 22, 2025, 5:13 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.618527] ================================================================== [ 32.618576] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 32.618634] Read of size 1 at addr fff00000c9227a10 by task kunit_try_catch/290 [ 32.618685] [ 32.618720] CPU: 1 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250722 #1 PREEMPT [ 32.618828] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 32.618860] Hardware name: linux,dummy-virt (DT) [ 32.619029] Call trace: [ 32.619065] show_stack+0x20/0x38 (C) [ 32.619122] dump_stack_lvl+0x8c/0xd0 [ 32.619171] print_report+0x118/0x5e8 [ 32.619219] kasan_report+0xdc/0x128 [ 32.619264] __asan_report_load1_noabort+0x20/0x30 [ 32.619316] strcmp+0xc0/0xc8 [ 32.619361] kasan_strings+0x340/0xb00 [ 32.619435] kunit_try_run_case+0x170/0x3f0 [ 32.619486] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.619538] kthread+0x328/0x630 [ 32.619583] ret_from_fork+0x10/0x20 [ 32.619641] [ 32.619663] Allocated by task 290: [ 32.619694] kasan_save_stack+0x3c/0x68 [ 32.619747] kasan_save_track+0x20/0x40 [ 32.619786] kasan_save_alloc_info+0x40/0x58 [ 32.620725] __kasan_kmalloc+0xd4/0xd8 [ 32.621106] __kmalloc_cache_noprof+0x16c/0x3c0 [ 32.621231] kasan_strings+0xc8/0xb00 [ 32.621326] kunit_try_run_case+0x170/0x3f0 [ 32.621643] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.621738] kthread+0x328/0x630 [ 32.621781] ret_from_fork+0x10/0x20 [ 32.622057] [ 32.622135] Freed by task 290: [ 32.622271] kasan_save_stack+0x3c/0x68 [ 32.622357] kasan_save_track+0x20/0x40 [ 32.622513] kasan_save_free_info+0x4c/0x78 [ 32.622589] __kasan_slab_free+0x6c/0x98 [ 32.622941] kfree+0x214/0x3c8 [ 32.623012] kasan_strings+0x24c/0xb00 [ 32.623148] kunit_try_run_case+0x170/0x3f0 [ 32.623235] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.623367] kthread+0x328/0x630 [ 32.623402] ret_from_fork+0x10/0x20 [ 32.623728] [ 32.623779] The buggy address belongs to the object at fff00000c9227a00 [ 32.623779] which belongs to the cache kmalloc-32 of size 32 [ 32.623928] The buggy address is located 16 bytes inside of [ 32.623928] freed 32-byte region [fff00000c9227a00, fff00000c9227a20) [ 32.624054] [ 32.624450] The buggy address belongs to the physical page: [ 32.624537] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109227 [ 32.624674] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.624779] page_type: f5(slab) [ 32.624868] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 32.625160] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 32.625242] page dumped because: kasan: bad access detected [ 32.625557] [ 32.625602] Memory state around the buggy address: [ 32.625730] fff00000c9227900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.625906] fff00000c9227980: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.626003] >fff00000c9227a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 32.626057] ^ [ 32.626092] fff00000c9227a80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.626390] fff00000c9227b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 32.626576] ==================================================================
[ 26.990818] ================================================================== [ 26.992089] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 26.992751] Read of size 1 at addr ffff888106006150 by task kunit_try_catch/307 [ 26.993066] [ 26.993189] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) [ 26.993240] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.993253] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.993276] Call Trace: [ 26.993290] <TASK> [ 26.993306] dump_stack_lvl+0x73/0xb0 [ 26.993334] print_report+0xd1/0x640 [ 26.993358] ? __virt_addr_valid+0x1db/0x2d0 [ 26.993383] ? strcmp+0xb0/0xc0 [ 26.993402] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.993430] ? strcmp+0xb0/0xc0 [ 26.993450] kasan_report+0x141/0x180 [ 26.993474] ? strcmp+0xb0/0xc0 [ 26.993498] __asan_report_load1_noabort+0x18/0x20 [ 26.993523] strcmp+0xb0/0xc0 [ 26.993546] kasan_strings+0x431/0xe80 [ 26.993636] ? trace_hardirqs_on+0x37/0xe0 [ 26.993660] ? __pfx_kasan_strings+0x10/0x10 [ 26.993681] ? finish_task_switch.isra.0+0x153/0x700 [ 26.993703] ? __switch_to+0x47/0xf80 [ 26.993731] ? __schedule+0x10da/0x2b60 [ 26.993757] ? __pfx_read_tsc+0x10/0x10 [ 26.993779] ? ktime_get_ts64+0x86/0x230 [ 26.993804] kunit_try_run_case+0x1a5/0x480 [ 26.993843] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.993867] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.993892] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.993917] ? __kthread_parkme+0x82/0x180 [ 26.993938] ? preempt_count_sub+0x50/0x80 [ 26.993961] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.993986] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.994011] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.994035] kthread+0x337/0x6f0 [ 26.994056] ? trace_preempt_on+0x20/0xc0 [ 26.994078] ? __pfx_kthread+0x10/0x10 [ 26.994100] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.994124] ? calculate_sigpending+0x7b/0xa0 [ 26.994148] ? __pfx_kthread+0x10/0x10 [ 26.994179] ret_from_fork+0x116/0x1d0 [ 26.994201] ? __pfx_kthread+0x10/0x10 [ 26.994222] ret_from_fork_asm+0x1a/0x30 [ 26.994254] </TASK> [ 26.994264] [ 27.001953] Allocated by task 307: [ 27.002087] kasan_save_stack+0x45/0x70 [ 27.002233] kasan_save_track+0x18/0x40 [ 27.002367] kasan_save_alloc_info+0x3b/0x50 [ 27.002783] __kasan_kmalloc+0xb7/0xc0 [ 27.002994] __kmalloc_cache_noprof+0x189/0x420 [ 27.003212] kasan_strings+0xc0/0xe80 [ 27.003394] kunit_try_run_case+0x1a5/0x480 [ 27.003599] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.004023] kthread+0x337/0x6f0 [ 27.004217] ret_from_fork+0x116/0x1d0 [ 27.004425] ret_from_fork_asm+0x1a/0x30 [ 27.004564] [ 27.004636] Freed by task 307: [ 27.004789] kasan_save_stack+0x45/0x70 [ 27.005298] kasan_save_track+0x18/0x40 [ 27.005577] kasan_save_free_info+0x3f/0x60 [ 27.005737] __kasan_slab_free+0x56/0x70 [ 27.005934] kfree+0x222/0x3f0 [ 27.006096] kasan_strings+0x2aa/0xe80 [ 27.006420] kunit_try_run_case+0x1a5/0x480 [ 27.006667] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.006888] kthread+0x337/0x6f0 [ 27.007052] ret_from_fork+0x116/0x1d0 [ 27.007282] ret_from_fork_asm+0x1a/0x30 [ 27.007451] [ 27.007531] The buggy address belongs to the object at ffff888106006140 [ 27.007531] which belongs to the cache kmalloc-32 of size 32 [ 27.007910] The buggy address is located 16 bytes inside of [ 27.007910] freed 32-byte region [ffff888106006140, ffff888106006160) [ 27.008267] [ 27.008335] The buggy address belongs to the physical page: [ 27.008559] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106006 [ 27.009040] flags: 0x200000000000000(node=0|zone=2) [ 27.009313] page_type: f5(slab) [ 27.009477] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.009796] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.010047] page dumped because: kasan: bad access detected [ 27.010219] [ 27.010284] Memory state around the buggy address: [ 27.010437] ffff888106006000: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.010972] ffff888106006080: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.011750] >ffff888106006100: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.012110] ^ [ 27.012666] ffff888106006180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.012984] ffff888106006200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.013290] ==================================================================