Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.428606] ================================================================== [ 20.428678] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 20.428732] Read of size 1 at addr fff00000c77d8490 by task kunit_try_catch/259 [ 20.429465] [ 20.429998] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.430414] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.430445] Hardware name: linux,dummy-virt (DT) [ 20.430478] Call trace: [ 20.430505] show_stack+0x20/0x38 (C) [ 20.431041] dump_stack_lvl+0x8c/0xd0 [ 20.431381] print_report+0x118/0x608 [ 20.431830] kasan_report+0xdc/0x128 [ 20.431902] __asan_report_load1_noabort+0x20/0x30 [ 20.431956] strnlen+0x80/0x88 [ 20.431998] kasan_strings+0x478/0xb00 [ 20.432043] kunit_try_run_case+0x170/0x3f0 [ 20.433233] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.433745] kthread+0x328/0x630 [ 20.434642] ret_from_fork+0x10/0x20 [ 20.434735] [ 20.435204] Allocated by task 259: [ 20.435582] kasan_save_stack+0x3c/0x68 [ 20.435938] kasan_save_track+0x20/0x40 [ 20.436132] kasan_save_alloc_info+0x40/0x58 [ 20.436777] __kasan_kmalloc+0xd4/0xd8 [ 20.436891] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.437369] kasan_strings+0xc8/0xb00 [ 20.437411] kunit_try_run_case+0x170/0x3f0 [ 20.438086] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.438248] kthread+0x328/0x630 [ 20.438283] ret_from_fork+0x10/0x20 [ 20.438323] [ 20.438344] Freed by task 259: [ 20.438373] kasan_save_stack+0x3c/0x68 [ 20.438415] kasan_save_track+0x20/0x40 [ 20.438454] kasan_save_free_info+0x4c/0x78 [ 20.439508] __kasan_slab_free+0x6c/0x98 [ 20.439977] kfree+0x214/0x3c8 [ 20.440360] kasan_strings+0x24c/0xb00 [ 20.440403] kunit_try_run_case+0x170/0x3f0 [ 20.440708] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.440956] kthread+0x328/0x630 [ 20.441087] ret_from_fork+0x10/0x20 [ 20.441128] [ 20.441734] The buggy address belongs to the object at fff00000c77d8480 [ 20.441734] which belongs to the cache kmalloc-32 of size 32 [ 20.442201] The buggy address is located 16 bytes inside of [ 20.442201] freed 32-byte region [fff00000c77d8480, fff00000c77d84a0) [ 20.442298] [ 20.442322] The buggy address belongs to the physical page: [ 20.442356] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d8 [ 20.443283] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.443528] page_type: f5(slab) [ 20.444048] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.444411] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.444577] page dumped because: kasan: bad access detected [ 20.444837] [ 20.444962] Memory state around the buggy address: [ 20.445002] fff00000c77d8380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.445050] fff00000c77d8400: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.445094] >fff00000c77d8480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.445134] ^ [ 20.445165] fff00000c77d8500: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.445209] fff00000c77d8580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.445248] ==================================================================
[ 13.574766] ================================================================== [ 13.575966] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 13.576440] Read of size 1 at addr ffff8881031c3250 by task kunit_try_catch/277 [ 13.577290] [ 13.577476] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.577523] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.577536] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.577560] Call Trace: [ 13.577579] <TASK> [ 13.577597] dump_stack_lvl+0x73/0xb0 [ 13.577626] print_report+0xd1/0x650 [ 13.577649] ? __virt_addr_valid+0x1db/0x2d0 [ 13.577670] ? strnlen+0x73/0x80 [ 13.577843] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.577869] ? strnlen+0x73/0x80 [ 13.577888] kasan_report+0x141/0x180 [ 13.577911] ? strnlen+0x73/0x80 [ 13.577933] __asan_report_load1_noabort+0x18/0x20 [ 13.577957] strnlen+0x73/0x80 [ 13.578010] kasan_strings+0x615/0xe80 [ 13.578032] ? trace_hardirqs_on+0x37/0xe0 [ 13.578055] ? __pfx_kasan_strings+0x10/0x10 [ 13.578076] ? finish_task_switch.isra.0+0x153/0x700 [ 13.578097] ? __switch_to+0x47/0xf50 [ 13.578122] ? __schedule+0x10cc/0x2b60 [ 13.578144] ? __pfx_read_tsc+0x10/0x10 [ 13.578165] ? ktime_get_ts64+0x86/0x230 [ 13.578188] kunit_try_run_case+0x1a5/0x480 [ 13.578276] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.578300] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.578324] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.578347] ? __kthread_parkme+0x82/0x180 [ 13.578366] ? preempt_count_sub+0x50/0x80 [ 13.578389] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.578413] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.578435] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.578471] kthread+0x337/0x6f0 [ 13.578491] ? trace_preempt_on+0x20/0xc0 [ 13.578513] ? __pfx_kthread+0x10/0x10 [ 13.578533] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.578555] ? calculate_sigpending+0x7b/0xa0 [ 13.578577] ? __pfx_kthread+0x10/0x10 [ 13.578598] ret_from_fork+0x116/0x1d0 [ 13.578616] ? __pfx_kthread+0x10/0x10 [ 13.578635] ret_from_fork_asm+0x1a/0x30 [ 13.578664] </TASK> [ 13.578677] [ 13.593212] Allocated by task 277: [ 13.593712] kasan_save_stack+0x45/0x70 [ 13.594041] kasan_save_track+0x18/0x40 [ 13.594577] kasan_save_alloc_info+0x3b/0x50 [ 13.594940] __kasan_kmalloc+0xb7/0xc0 [ 13.595126] __kmalloc_cache_noprof+0x189/0x420 [ 13.595538] kasan_strings+0xc0/0xe80 [ 13.595822] kunit_try_run_case+0x1a5/0x480 [ 13.596127] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.596393] kthread+0x337/0x6f0 [ 13.596566] ret_from_fork+0x116/0x1d0 [ 13.597254] ret_from_fork_asm+0x1a/0x30 [ 13.597657] [ 13.597771] Freed by task 277: [ 13.597921] kasan_save_stack+0x45/0x70 [ 13.598104] kasan_save_track+0x18/0x40 [ 13.598645] kasan_save_free_info+0x3f/0x60 [ 13.598905] __kasan_slab_free+0x56/0x70 [ 13.599213] kfree+0x222/0x3f0 [ 13.599541] kasan_strings+0x2aa/0xe80 [ 13.599864] kunit_try_run_case+0x1a5/0x480 [ 13.600162] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.600418] kthread+0x337/0x6f0 [ 13.600748] ret_from_fork+0x116/0x1d0 [ 13.601292] ret_from_fork_asm+0x1a/0x30 [ 13.601513] [ 13.601615] The buggy address belongs to the object at ffff8881031c3240 [ 13.601615] which belongs to the cache kmalloc-32 of size 32 [ 13.602594] The buggy address is located 16 bytes inside of [ 13.602594] freed 32-byte region [ffff8881031c3240, ffff8881031c3260) [ 13.603420] [ 13.603674] The buggy address belongs to the physical page: [ 13.604239] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031c3 [ 13.604729] flags: 0x200000000000000(node=0|zone=2) [ 13.605085] page_type: f5(slab) [ 13.605404] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.605880] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.606403] page dumped because: kasan: bad access detected [ 13.606842] [ 13.606947] Memory state around the buggy address: [ 13.607160] ffff8881031c3100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.607748] ffff8881031c3180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.608305] >ffff8881031c3200: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.608984] ^ [ 13.609463] ffff8881031c3280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.610025] ffff8881031c3300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.610820] ==================================================================