Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.358022] ================================================================== [ 20.358140] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 20.358275] Read of size 1 at addr fff00000c77d8490 by task kunit_try_catch/259 [ 20.358399] [ 20.358457] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.358605] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.358654] Hardware name: linux,dummy-virt (DT) [ 20.358688] Call trace: [ 20.358727] show_stack+0x20/0x38 (C) [ 20.358787] dump_stack_lvl+0x8c/0xd0 [ 20.359191] print_report+0x118/0x608 [ 20.359341] kasan_report+0xdc/0x128 [ 20.359431] __asan_report_load1_noabort+0x20/0x30 [ 20.359499] strcmp+0xc0/0xc8 [ 20.359645] kasan_strings+0x340/0xb00 [ 20.359789] kunit_try_run_case+0x170/0x3f0 [ 20.361926] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.362084] kthread+0x328/0x630 [ 20.362169] ret_from_fork+0x10/0x20 [ 20.362298] [ 20.362369] Allocated by task 259: [ 20.362402] kasan_save_stack+0x3c/0x68 [ 20.362447] kasan_save_track+0x20/0x40 [ 20.362538] kasan_save_alloc_info+0x40/0x58 [ 20.362760] __kasan_kmalloc+0xd4/0xd8 [ 20.362917] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.363017] kasan_strings+0xc8/0xb00 [ 20.363093] kunit_try_run_case+0x170/0x3f0 [ 20.363167] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.363220] kthread+0x328/0x630 [ 20.363377] ret_from_fork+0x10/0x20 [ 20.363430] [ 20.363450] Freed by task 259: [ 20.363480] kasan_save_stack+0x3c/0x68 [ 20.363539] kasan_save_track+0x20/0x40 [ 20.363587] kasan_save_free_info+0x4c/0x78 [ 20.364220] __kasan_slab_free+0x6c/0x98 [ 20.364547] kfree+0x214/0x3c8 [ 20.364806] kasan_strings+0x24c/0xb00 [ 20.365049] kunit_try_run_case+0x170/0x3f0 [ 20.365111] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.365155] kthread+0x328/0x630 [ 20.365191] ret_from_fork+0x10/0x20 [ 20.365230] [ 20.366545] The buggy address belongs to the object at fff00000c77d8480 [ 20.366545] which belongs to the cache kmalloc-32 of size 32 [ 20.366935] The buggy address is located 16 bytes inside of [ 20.366935] freed 32-byte region [fff00000c77d8480, fff00000c77d84a0) [ 20.367850] [ 20.367917] The buggy address belongs to the physical page: [ 20.367950] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d8 [ 20.368302] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.368360] page_type: f5(slab) [ 20.368401] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.368454] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.368785] page dumped because: kasan: bad access detected [ 20.369055] [ 20.369798] Memory state around the buggy address: [ 20.370360] fff00000c77d8380: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.370443] fff00000c77d8400: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.370488] >fff00000c77d8480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.370961] ^ [ 20.371055] fff00000c77d8500: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.371170] fff00000c77d8580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.371466] ==================================================================
[ 13.486291] ================================================================== [ 13.487433] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 13.488072] Read of size 1 at addr ffff8881031c3250 by task kunit_try_catch/277 [ 13.488325] [ 13.488526] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.488690] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.488705] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.488728] Call Trace: [ 13.488754] <TASK> [ 13.488771] dump_stack_lvl+0x73/0xb0 [ 13.488801] print_report+0xd1/0x650 [ 13.488839] ? __virt_addr_valid+0x1db/0x2d0 [ 13.488861] ? strcmp+0xb0/0xc0 [ 13.488881] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.488903] ? strcmp+0xb0/0xc0 [ 13.488924] kasan_report+0x141/0x180 [ 13.488946] ? strcmp+0xb0/0xc0 [ 13.488972] __asan_report_load1_noabort+0x18/0x20 [ 13.488996] strcmp+0xb0/0xc0 [ 13.489018] kasan_strings+0x431/0xe80 [ 13.489038] ? trace_hardirqs_on+0x37/0xe0 [ 13.489061] ? __pfx_kasan_strings+0x10/0x10 [ 13.489081] ? finish_task_switch.isra.0+0x153/0x700 [ 13.489102] ? __switch_to+0x47/0xf50 [ 13.489128] ? __schedule+0x10cc/0x2b60 [ 13.489150] ? __pfx_read_tsc+0x10/0x10 [ 13.489171] ? ktime_get_ts64+0x86/0x230 [ 13.489248] kunit_try_run_case+0x1a5/0x480 [ 13.489278] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.489301] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.489325] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.489348] ? __kthread_parkme+0x82/0x180 [ 13.489367] ? preempt_count_sub+0x50/0x80 [ 13.489400] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.489423] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.489446] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.489482] kthread+0x337/0x6f0 [ 13.489501] ? trace_preempt_on+0x20/0xc0 [ 13.489522] ? __pfx_kthread+0x10/0x10 [ 13.489542] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.489562] ? calculate_sigpending+0x7b/0xa0 [ 13.489585] ? __pfx_kthread+0x10/0x10 [ 13.489607] ret_from_fork+0x116/0x1d0 [ 13.489624] ? __pfx_kthread+0x10/0x10 [ 13.489645] ret_from_fork_asm+0x1a/0x30 [ 13.489674] </TASK> [ 13.489686] [ 13.498914] Allocated by task 277: [ 13.499090] kasan_save_stack+0x45/0x70 [ 13.499404] kasan_save_track+0x18/0x40 [ 13.499643] kasan_save_alloc_info+0x3b/0x50 [ 13.499887] __kasan_kmalloc+0xb7/0xc0 [ 13.500049] __kmalloc_cache_noprof+0x189/0x420 [ 13.500541] kasan_strings+0xc0/0xe80 [ 13.500771] kunit_try_run_case+0x1a5/0x480 [ 13.500930] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.501122] kthread+0x337/0x6f0 [ 13.501284] ret_from_fork+0x116/0x1d0 [ 13.501513] ret_from_fork_asm+0x1a/0x30 [ 13.501780] [ 13.501857] Freed by task 277: [ 13.501967] kasan_save_stack+0x45/0x70 [ 13.502302] kasan_save_track+0x18/0x40 [ 13.502603] kasan_save_free_info+0x3f/0x60 [ 13.502878] __kasan_slab_free+0x56/0x70 [ 13.503015] kfree+0x222/0x3f0 [ 13.503178] kasan_strings+0x2aa/0xe80 [ 13.503510] kunit_try_run_case+0x1a5/0x480 [ 13.503787] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.504023] kthread+0x337/0x6f0 [ 13.504323] ret_from_fork+0x116/0x1d0 [ 13.504515] ret_from_fork_asm+0x1a/0x30 [ 13.504799] [ 13.504881] The buggy address belongs to the object at ffff8881031c3240 [ 13.504881] which belongs to the cache kmalloc-32 of size 32 [ 13.505473] The buggy address is located 16 bytes inside of [ 13.505473] freed 32-byte region [ffff8881031c3240, ffff8881031c3260) [ 13.506111] [ 13.506214] The buggy address belongs to the physical page: [ 13.506626] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031c3 [ 13.507009] flags: 0x200000000000000(node=0|zone=2) [ 13.507259] page_type: f5(slab) [ 13.507398] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.507870] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.508308] page dumped because: kasan: bad access detected [ 13.508638] [ 13.508766] Memory state around the buggy address: [ 13.509021] ffff8881031c3100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.509370] ffff8881031c3180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.509768] >ffff8881031c3200: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.510133] ^ [ 13.510426] ffff8881031c3280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.510772] ffff8881031c3300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.511052] ==================================================================