Date
July 5, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.467595] ================================================================== [ 20.467838] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 20.467897] Read of size 1 at addr fff00000c78cc650 by task kunit_try_catch/259 [ 20.467950] [ 20.467982] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.468064] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.468434] Hardware name: linux,dummy-virt (DT) [ 20.468496] Call trace: [ 20.468554] show_stack+0x20/0x38 (C) [ 20.468609] dump_stack_lvl+0x8c/0xd0 [ 20.469056] print_report+0x118/0x608 [ 20.469127] kasan_report+0xdc/0x128 [ 20.469263] __asan_report_load1_noabort+0x20/0x30 [ 20.469318] strlen+0xa8/0xb0 [ 20.469360] kasan_strings+0x418/0xb00 [ 20.469404] kunit_try_run_case+0x170/0x3f0 [ 20.469729] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.469789] kthread+0x328/0x630 [ 20.469836] ret_from_fork+0x10/0x20 [ 20.470113] [ 20.470166] Allocated by task 259: [ 20.470222] kasan_save_stack+0x3c/0x68 [ 20.470267] kasan_save_track+0x20/0x40 [ 20.470312] kasan_save_alloc_info+0x40/0x58 [ 20.470492] __kasan_kmalloc+0xd4/0xd8 [ 20.470738] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.470815] kasan_strings+0xc8/0xb00 [ 20.470853] kunit_try_run_case+0x170/0x3f0 [ 20.470892] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.470944] kthread+0x328/0x630 [ 20.471091] ret_from_fork+0x10/0x20 [ 20.471127] [ 20.471148] Freed by task 259: [ 20.471188] kasan_save_stack+0x3c/0x68 [ 20.471225] kasan_save_track+0x20/0x40 [ 20.471312] kasan_save_free_info+0x4c/0x78 [ 20.471477] __kasan_slab_free+0x6c/0x98 [ 20.471524] kfree+0x214/0x3c8 [ 20.471693] kasan_strings+0x24c/0xb00 [ 20.471838] kunit_try_run_case+0x170/0x3f0 [ 20.471918] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.471964] kthread+0x328/0x630 [ 20.472025] ret_from_fork+0x10/0x20 [ 20.472063] [ 20.472083] The buggy address belongs to the object at fff00000c78cc640 [ 20.472083] which belongs to the cache kmalloc-32 of size 32 [ 20.472141] The buggy address is located 16 bytes inside of [ 20.472141] freed 32-byte region [fff00000c78cc640, fff00000c78cc660) [ 20.472411] [ 20.472446] The buggy address belongs to the physical page: [ 20.472480] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cc [ 20.472535] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.473303] page_type: f5(slab) [ 20.473369] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.473422] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.473475] page dumped because: kasan: bad access detected [ 20.473509] [ 20.473530] Memory state around the buggy address: [ 20.473578] fff00000c78cc500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.474027] fff00000c78cc580: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.474085] >fff00000c78cc600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.474127] ^ [ 20.474175] fff00000c78cc680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.474418] fff00000c78cc700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.474600] ==================================================================
[ 15.766903] ================================================================== [ 15.767380] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 15.767677] Read of size 1 at addr ffff888102a0d790 by task kunit_try_catch/277 [ 15.768002] [ 15.768477] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 15.768537] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.768553] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.768581] Call Trace: [ 15.768596] <TASK> [ 15.768617] dump_stack_lvl+0x73/0xb0 [ 15.768653] print_report+0xd1/0x650 [ 15.768681] ? __virt_addr_valid+0x1db/0x2d0 [ 15.768708] ? strlen+0x8f/0xb0 [ 15.768730] ? kasan_complete_mode_report_info+0x64/0x200 [ 15.768756] ? strlen+0x8f/0xb0 [ 15.768778] kasan_report+0x141/0x180 [ 15.768820] ? strlen+0x8f/0xb0 [ 15.768847] __asan_report_load1_noabort+0x18/0x20 [ 15.768875] strlen+0x8f/0xb0 [ 15.768896] kasan_strings+0x57b/0xe80 [ 15.768920] ? trace_hardirqs_on+0x37/0xe0 [ 15.768949] ? __pfx_kasan_strings+0x10/0x10 [ 15.768973] ? finish_task_switch.isra.0+0x153/0x700 [ 15.769000] ? __switch_to+0x47/0xf50 [ 15.769030] ? __schedule+0x10cc/0x2b60 [ 15.769057] ? __pfx_read_tsc+0x10/0x10 [ 15.769082] ? ktime_get_ts64+0x86/0x230 [ 15.769110] kunit_try_run_case+0x1a5/0x480 [ 15.769230] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.769262] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.769290] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.769318] ? __kthread_parkme+0x82/0x180 [ 15.769350] ? preempt_count_sub+0x50/0x80 [ 15.769377] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.769404] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.769432] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.769459] kthread+0x337/0x6f0 [ 15.769482] ? trace_preempt_on+0x20/0xc0 [ 15.769508] ? __pfx_kthread+0x10/0x10 [ 15.769533] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.769558] ? calculate_sigpending+0x7b/0xa0 [ 15.769588] ? __pfx_kthread+0x10/0x10 [ 15.769614] ret_from_fork+0x116/0x1d0 [ 15.769636] ? __pfx_kthread+0x10/0x10 [ 15.769660] ret_from_fork_asm+0x1a/0x30 [ 15.769695] </TASK> [ 15.769710] [ 15.781979] Allocated by task 277: [ 15.782207] kasan_save_stack+0x45/0x70 [ 15.782456] kasan_save_track+0x18/0x40 [ 15.782736] kasan_save_alloc_info+0x3b/0x50 [ 15.783008] __kasan_kmalloc+0xb7/0xc0 [ 15.783346] __kmalloc_cache_noprof+0x189/0x420 [ 15.783563] kasan_strings+0xc0/0xe80 [ 15.783719] kunit_try_run_case+0x1a5/0x480 [ 15.783924] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.784221] kthread+0x337/0x6f0 [ 15.784418] ret_from_fork+0x116/0x1d0 [ 15.784607] ret_from_fork_asm+0x1a/0x30 [ 15.784784] [ 15.784908] Freed by task 277: [ 15.785086] kasan_save_stack+0x45/0x70 [ 15.785297] kasan_save_track+0x18/0x40 [ 15.785545] kasan_save_free_info+0x3f/0x60 [ 15.785715] __kasan_slab_free+0x56/0x70 [ 15.785886] kfree+0x222/0x3f0 [ 15.786077] kasan_strings+0x2aa/0xe80 [ 15.786304] kunit_try_run_case+0x1a5/0x480 [ 15.786535] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.786841] kthread+0x337/0x6f0 [ 15.787036] ret_from_fork+0x116/0x1d0 [ 15.787309] ret_from_fork_asm+0x1a/0x30 [ 15.787514] [ 15.787598] The buggy address belongs to the object at ffff888102a0d780 [ 15.787598] which belongs to the cache kmalloc-32 of size 32 [ 15.788261] The buggy address is located 16 bytes inside of [ 15.788261] freed 32-byte region [ffff888102a0d780, ffff888102a0d7a0) [ 15.788776] [ 15.788887] The buggy address belongs to the physical page: [ 15.789159] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a0d [ 15.789453] flags: 0x200000000000000(node=0|zone=2) [ 15.789643] page_type: f5(slab) [ 15.789784] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 15.790581] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.790988] page dumped because: kasan: bad access detected [ 15.791607] [ 15.791723] Memory state around the buggy address: [ 15.791997] ffff888102a0d680: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.792433] ffff888102a0d700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.792751] >ffff888102a0d780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.793378] ^ [ 15.793582] ffff888102a0d800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.793892] ffff888102a0d880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 15.794137] ==================================================================