Date
June 24, 2025, 11:37 a.m.
Environment | |
---|---|
dragonboard-845c | |
qemu-x86_64 |
[ 51.560534] ================================================================== [ 51.567852] BUG: KASAN: slab-use-after-free in strnlen+0x80/0x88 [ 51.573936] Read of size 1 at addr ffff000093781910 by task kunit_try_catch/357 [ 51.581341] [ 51.582866] CPU: 6 UID: 0 PID: 357 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT [ 51.582895] Tainted: [B]=BAD_PAGE, [N]=TEST [ 51.582903] Hardware name: Thundercomm Dragonboard 845c (DT) [ 51.582914] Call trace: [ 51.582920] show_stack+0x20/0x38 (C) [ 51.582937] dump_stack_lvl+0x8c/0xd0 [ 51.582955] print_report+0x118/0x608 [ 51.582973] kasan_report+0xdc/0x128 [ 51.582991] __asan_report_load1_noabort+0x20/0x30 [ 51.583008] strnlen+0x80/0x88 [ 51.583021] kasan_strings+0x478/0xb00 [ 51.583036] kunit_try_run_case+0x170/0x3f0 [ 51.583054] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 51.583074] kthread+0x328/0x630 [ 51.583088] ret_from_fork+0x10/0x20 [ 51.583104] [ 51.651415] Allocated by task 357: [ 51.654870] kasan_save_stack+0x3c/0x68 [ 51.658778] kasan_save_track+0x20/0x40 [ 51.662683] kasan_save_alloc_info+0x40/0x58 [ 51.667019] __kasan_kmalloc+0xd4/0xd8 [ 51.670836] __kmalloc_cache_noprof+0x16c/0x3c0 [ 51.675430] kasan_strings+0xc8/0xb00 [ 51.679148] kunit_try_run_case+0x170/0x3f0 [ 51.683396] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 51.688962] kthread+0x328/0x630 [ 51.692243] ret_from_fork+0x10/0x20 [ 51.695874] [ 51.697396] Freed by task 357: [ 51.700500] kasan_save_stack+0x3c/0x68 [ 51.704395] kasan_save_track+0x20/0x40 [ 51.708300] kasan_save_free_info+0x4c/0x78 [ 51.712548] __kasan_slab_free+0x6c/0x98 [ 51.716538] kfree+0x214/0x3c8 [ 51.719647] kasan_strings+0x24c/0xb00 [ 51.723460] kunit_try_run_case+0x170/0x3f0 [ 51.727710] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 51.733285] kthread+0x328/0x630 [ 51.736579] ret_from_fork+0x10/0x20 [ 51.740215] [ 51.741741] The buggy address belongs to the object at ffff000093781900 [ 51.741741] which belongs to the cache kmalloc-32 of size 32 [ 51.754222] The buggy address is located 16 bytes inside of [ 51.754222] freed 32-byte region [ffff000093781900, ffff000093781920) [ 51.766441] [ 51.767974] The buggy address belongs to the physical page: [ 51.773616] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113781 [ 51.781716] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 51.788329] page_type: f5(slab) [ 51.791527] raw: 0bfffe0000000000 ffff000080002780 dead000000000122 0000000000000000 [ 51.799369] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 51.807204] page dumped because: kasan: bad access detected [ 51.812846] [ 51.814368] Memory state around the buggy address: [ 51.819229] ffff000093781800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 51.826534] ffff000093781880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 51.833852] >ffff000093781900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 51.841164] ^ [ 51.844976] ffff000093781980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 51.852291] ffff000093781a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 51.859604] ==================================================================
[ 31.765530] ================================================================== [ 31.765907] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80 [ 31.766509] Read of size 1 at addr ffff888103b4da50 by task kunit_try_catch/289 [ 31.767111] [ 31.767288] CPU: 1 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250624 #1 PREEMPT(voluntary) [ 31.767403] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.767432] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.767480] Call Trace: [ 31.767524] <TASK> [ 31.767671] dump_stack_lvl+0x73/0xb0 [ 31.767761] print_report+0xd1/0x650 [ 31.767836] ? __virt_addr_valid+0x1db/0x2d0 [ 31.767894] ? strnlen+0x73/0x80 [ 31.767943] ? kasan_complete_mode_report_info+0x64/0x200 [ 31.768012] ? strnlen+0x73/0x80 [ 31.768064] kasan_report+0x141/0x180 [ 31.768207] ? strnlen+0x73/0x80 [ 31.768311] __asan_report_load1_noabort+0x18/0x20 [ 31.768401] strnlen+0x73/0x80 [ 31.768474] kasan_strings+0x615/0xe80 [ 31.768560] ? trace_hardirqs_on+0x37/0xe0 [ 31.768626] ? __pfx_kasan_strings+0x10/0x10 [ 31.768673] ? finish_task_switch.isra.0+0x153/0x700 [ 31.768727] ? __switch_to+0x47/0xf50 [ 31.768793] ? __schedule+0x10cc/0x2b60 [ 31.768859] ? __pfx_read_tsc+0x10/0x10 [ 31.768916] ? ktime_get_ts64+0x86/0x230 [ 31.768972] kunit_try_run_case+0x1a5/0x480 [ 31.769037] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.769196] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 31.769300] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.769368] ? __kthread_parkme+0x82/0x180 [ 31.769433] ? preempt_count_sub+0x50/0x80 [ 31.769470] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.769506] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.769558] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.769592] kthread+0x337/0x6f0 [ 31.769619] ? trace_preempt_on+0x20/0xc0 [ 31.769665] ? __pfx_kthread+0x10/0x10 [ 31.769693] ? _raw_spin_unlock_irq+0x47/0x80 [ 31.769724] ? calculate_sigpending+0x7b/0xa0 [ 31.769757] ? __pfx_kthread+0x10/0x10 [ 31.769786] ret_from_fork+0x116/0x1d0 [ 31.769812] ? __pfx_kthread+0x10/0x10 [ 31.769839] ret_from_fork_asm+0x1a/0x30 [ 31.769877] </TASK> [ 31.769892] [ 31.785820] Allocated by task 289: [ 31.786351] kasan_save_stack+0x45/0x70 [ 31.786836] kasan_save_track+0x18/0x40 [ 31.787404] kasan_save_alloc_info+0x3b/0x50 [ 31.787887] __kasan_kmalloc+0xb7/0xc0 [ 31.788327] __kmalloc_cache_noprof+0x189/0x420 [ 31.788870] kasan_strings+0xc0/0xe80 [ 31.789307] kunit_try_run_case+0x1a5/0x480 [ 31.789820] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.790177] kthread+0x337/0x6f0 [ 31.790530] ret_from_fork+0x116/0x1d0 [ 31.791565] ret_from_fork_asm+0x1a/0x30 [ 31.792012] [ 31.792356] Freed by task 289: [ 31.792654] kasan_save_stack+0x45/0x70 [ 31.793188] kasan_save_track+0x18/0x40 [ 31.793562] kasan_save_free_info+0x3f/0x60 [ 31.794034] __kasan_slab_free+0x56/0x70 [ 31.794555] kfree+0x222/0x3f0 [ 31.794949] kasan_strings+0x2aa/0xe80 [ 31.795418] kunit_try_run_case+0x1a5/0x480 [ 31.795885] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.796292] kthread+0x337/0x6f0 [ 31.797141] ret_from_fork+0x116/0x1d0 [ 31.797578] ret_from_fork_asm+0x1a/0x30 [ 31.797913] [ 31.798252] The buggy address belongs to the object at ffff888103b4da40 [ 31.798252] which belongs to the cache kmalloc-32 of size 32 [ 31.799252] The buggy address is located 16 bytes inside of [ 31.799252] freed 32-byte region [ffff888103b4da40, ffff888103b4da60) [ 31.800596] [ 31.800720] The buggy address belongs to the physical page: [ 31.801191] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b4d [ 31.801762] flags: 0x200000000000000(node=0|zone=2) [ 31.802402] page_type: f5(slab) [ 31.802791] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 31.803574] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.804207] page dumped because: kasan: bad access detected [ 31.804792] [ 31.805175] Memory state around the buggy address: [ 31.805558] ffff888103b4d900: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.805921] ffff888103b4d980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.806233] >ffff888103b4da00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.806875] ^ [ 31.807643] ffff888103b4da80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.808465] ffff888103b4db00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.809199] ==================================================================