Date
July 3, 2025, 6:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.161619] ================================================================== [ 19.161689] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0 [ 19.161895] Read of size 1 at addr fff00000c7832b50 by task kunit_try_catch/259 [ 19.162187] [ 19.162239] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.162618] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.162665] Hardware name: linux,dummy-virt (DT) [ 19.163060] Call trace: [ 19.163274] show_stack+0x20/0x38 (C) [ 19.163345] dump_stack_lvl+0x8c/0xd0 [ 19.163427] print_report+0x118/0x608 [ 19.163516] kasan_report+0xdc/0x128 [ 19.163579] __asan_report_load1_noabort+0x20/0x30 [ 19.163634] strlen+0xa8/0xb0 [ 19.163827] kasan_strings+0x418/0xb00 [ 19.163889] kunit_try_run_case+0x170/0x3f0 [ 19.164286] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.164354] kthread+0x328/0x630 [ 19.164399] ret_from_fork+0x10/0x20 [ 19.164564] [ 19.164609] Allocated by task 259: [ 19.164641] kasan_save_stack+0x3c/0x68 [ 19.164687] kasan_save_track+0x20/0x40 [ 19.164727] kasan_save_alloc_info+0x40/0x58 [ 19.164786] __kasan_kmalloc+0xd4/0xd8 [ 19.164841] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.164889] kasan_strings+0xc8/0xb00 [ 19.164932] kunit_try_run_case+0x170/0x3f0 [ 19.164995] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.165053] kthread+0x328/0x630 [ 19.165089] ret_from_fork+0x10/0x20 [ 19.165127] [ 19.165149] Freed by task 259: [ 19.165178] kasan_save_stack+0x3c/0x68 [ 19.165217] kasan_save_track+0x20/0x40 [ 19.165266] kasan_save_free_info+0x4c/0x78 [ 19.165308] __kasan_slab_free+0x6c/0x98 [ 19.165354] kfree+0x214/0x3c8 [ 19.165390] kasan_strings+0x24c/0xb00 [ 19.165459] kunit_try_run_case+0x170/0x3f0 [ 19.165500] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.165543] kthread+0x328/0x630 [ 19.165588] ret_from_fork+0x10/0x20 [ 19.165624] [ 19.165660] The buggy address belongs to the object at fff00000c7832b40 [ 19.165660] which belongs to the cache kmalloc-32 of size 32 [ 19.165726] The buggy address is located 16 bytes inside of [ 19.165726] freed 32-byte region [fff00000c7832b40, fff00000c7832b60) [ 19.165800] [ 19.165821] The buggy address belongs to the physical page: [ 19.165870] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107832 [ 19.165942] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.165993] page_type: f5(slab) [ 19.166041] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.166094] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.166139] page dumped because: kasan: bad access detected [ 19.166183] [ 19.166211] Memory state around the buggy address: [ 19.166244] fff00000c7832a00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.166299] fff00000c7832a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.166346] >fff00000c7832b00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.166396] ^ [ 19.166456] fff00000c7832b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.166501] fff00000c7832c00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 19.166544] ==================================================================
[ 13.387507] ================================================================== [ 13.388508] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 13.388805] Read of size 1 at addr ffff8881038e6250 by task kunit_try_catch/277 [ 13.389032] [ 13.389152] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.389197] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.389258] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.389281] Call Trace: [ 13.389297] <TASK> [ 13.389313] dump_stack_lvl+0x73/0xb0 [ 13.389339] print_report+0xd1/0x650 [ 13.389362] ? __virt_addr_valid+0x1db/0x2d0 [ 13.389384] ? strlen+0x8f/0xb0 [ 13.389401] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.389422] ? strlen+0x8f/0xb0 [ 13.389439] kasan_report+0x141/0x180 [ 13.389462] ? strlen+0x8f/0xb0 [ 13.389484] __asan_report_load1_noabort+0x18/0x20 [ 13.389509] strlen+0x8f/0xb0 [ 13.389528] kasan_strings+0x57b/0xe80 [ 13.389547] ? trace_hardirqs_on+0x37/0xe0 [ 13.389569] ? __pfx_kasan_strings+0x10/0x10 [ 13.389589] ? finish_task_switch.isra.0+0x153/0x700 [ 13.389609] ? __switch_to+0x47/0xf50 [ 13.389634] ? __schedule+0x10cc/0x2b60 [ 13.389656] ? __pfx_read_tsc+0x10/0x10 [ 13.389675] ? ktime_get_ts64+0x86/0x230 [ 13.389702] kunit_try_run_case+0x1a5/0x480 [ 13.389726] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.389748] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.389769] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.389791] ? __kthread_parkme+0x82/0x180 [ 13.389810] ? preempt_count_sub+0x50/0x80 [ 13.389833] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.389856] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.389879] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.389901] kthread+0x337/0x6f0 [ 13.389920] ? trace_preempt_on+0x20/0xc0 [ 13.389941] ? __pfx_kthread+0x10/0x10 [ 13.389961] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.389982] ? calculate_sigpending+0x7b/0xa0 [ 13.390005] ? __pfx_kthread+0x10/0x10 [ 13.390026] ret_from_fork+0x116/0x1d0 [ 13.390045] ? __pfx_kthread+0x10/0x10 [ 13.390065] ret_from_fork_asm+0x1a/0x30 [ 13.390094] </TASK> [ 13.390121] [ 13.406259] Allocated by task 277: [ 13.406733] kasan_save_stack+0x45/0x70 [ 13.407191] kasan_save_track+0x18/0x40 [ 13.407594] kasan_save_alloc_info+0x3b/0x50 [ 13.408039] __kasan_kmalloc+0xb7/0xc0 [ 13.408257] __kmalloc_cache_noprof+0x189/0x420 [ 13.408752] kasan_strings+0xc0/0xe80 [ 13.409152] kunit_try_run_case+0x1a5/0x480 [ 13.409444] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.409907] kthread+0x337/0x6f0 [ 13.410032] ret_from_fork+0x116/0x1d0 [ 13.410333] ret_from_fork_asm+0x1a/0x30 [ 13.410582] [ 13.410698] Freed by task 277: [ 13.410857] kasan_save_stack+0x45/0x70 [ 13.411047] kasan_save_track+0x18/0x40 [ 13.411284] kasan_save_free_info+0x3f/0x60 [ 13.411579] __kasan_slab_free+0x56/0x70 [ 13.411769] kfree+0x222/0x3f0 [ 13.411933] kasan_strings+0x2aa/0xe80 [ 13.412151] kunit_try_run_case+0x1a5/0x480 [ 13.412319] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.412590] kthread+0x337/0x6f0 [ 13.412843] ret_from_fork+0x116/0x1d0 [ 13.412991] ret_from_fork_asm+0x1a/0x30 [ 13.413302] [ 13.413387] The buggy address belongs to the object at ffff8881038e6240 [ 13.413387] which belongs to the cache kmalloc-32 of size 32 [ 13.413891] The buggy address is located 16 bytes inside of [ 13.413891] freed 32-byte region [ffff8881038e6240, ffff8881038e6260) [ 13.414441] [ 13.414515] The buggy address belongs to the physical page: [ 13.414793] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e6 [ 13.415321] flags: 0x200000000000000(node=0|zone=2) [ 13.415578] page_type: f5(slab) [ 13.415757] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.416024] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.416497] page dumped because: kasan: bad access detected [ 13.416677] [ 13.416753] Memory state around the buggy address: [ 13.416979] ffff8881038e6100: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc [ 13.417339] ffff8881038e6180: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.417746] >ffff8881038e6200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.418080] ^ [ 13.418470] ffff8881038e6280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.418754] ffff8881038e6300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.419080] ==================================================================