Hay
Date
July 11, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.035709] ==================================================================
[   19.035767] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   19.035861] Read of size 1 at addr fff00000c5908250 by task kunit_try_catch/260
[   19.035915] 
[   19.035948] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.036033] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.036063] Hardware name: linux,dummy-virt (DT)
[   19.036106] Call trace:
[   19.036140]  show_stack+0x20/0x38 (C)
[   19.036191]  dump_stack_lvl+0x8c/0xd0
[   19.036241]  print_report+0x118/0x608
[   19.036298]  kasan_report+0xdc/0x128
[   19.036355]  __asan_report_load1_noabort+0x20/0x30
[   19.036416]  kasan_strings+0x95c/0xb00
[   19.036462]  kunit_try_run_case+0x170/0x3f0
[   19.036509]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.036565]  kthread+0x328/0x630
[   19.036609]  ret_from_fork+0x10/0x20
[   19.036657] 
[   19.036686] Allocated by task 260:
[   19.036715]  kasan_save_stack+0x3c/0x68
[   19.036757]  kasan_save_track+0x20/0x40
[   19.036796]  kasan_save_alloc_info+0x40/0x58
[   19.036836]  __kasan_kmalloc+0xd4/0xd8
[   19.036885]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.036926]  kasan_strings+0xc8/0xb00
[   19.036963]  kunit_try_run_case+0x170/0x3f0
[   19.037001]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.037046]  kthread+0x328/0x630
[   19.037079]  ret_from_fork+0x10/0x20
[   19.037117] 
[   19.037180] Freed by task 260:
[   19.037452]  kasan_save_stack+0x3c/0x68
[   19.037503]  kasan_save_track+0x20/0x40
[   19.037600]  kasan_save_free_info+0x4c/0x78
[   19.037911]  __kasan_slab_free+0x6c/0x98
[   19.037978]  kfree+0x214/0x3c8
[   19.038017]  kasan_strings+0x24c/0xb00
[   19.038054]  kunit_try_run_case+0x170/0x3f0
[   19.038094]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.038139]  kthread+0x328/0x630
[   19.038215]  ret_from_fork+0x10/0x20
[   19.038252] 
[   19.038275] The buggy address belongs to the object at fff00000c5908240
[   19.038275]  which belongs to the cache kmalloc-32 of size 32
[   19.038429] The buggy address is located 16 bytes inside of
[   19.038429]  freed 32-byte region [fff00000c5908240, fff00000c5908260)
[   19.038500] 
[   19.038549] The buggy address belongs to the physical page:
[   19.038585] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105908
[   19.038638] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.038689] page_type: f5(slab)
[   19.038729] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.038779] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.038852] page dumped because: kasan: bad access detected
[   19.038884] 
[   19.039046] Memory state around the buggy address:
[   19.039149]  fff00000c5908100: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.039242]  fff00000c5908180: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   19.039339] >fff00000c5908200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.039380]                                                  ^
[   19.039442]  fff00000c5908280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.039486]  fff00000c5908300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.039527] ==================================================================

[   14.359520] ==================================================================
[   14.359755] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.359988] Read of size 1 at addr ffff888102a16ad0 by task kunit_try_catch/276
[   14.360694] 
[   14.360871] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.360916] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.360939] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.361368] Call Trace:
[   14.361386]  <TASK>
[   14.361404]  dump_stack_lvl+0x73/0xb0
[   14.361436]  print_report+0xd1/0x650
[   14.361457]  ? __virt_addr_valid+0x1db/0x2d0
[   14.361480]  ? kasan_strings+0xcbc/0xe80
[   14.361501]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.361524]  ? kasan_strings+0xcbc/0xe80
[   14.361546]  kasan_report+0x141/0x180
[   14.361568]  ? kasan_strings+0xcbc/0xe80
[   14.361594]  __asan_report_load1_noabort+0x18/0x20
[   14.361619]  kasan_strings+0xcbc/0xe80
[   14.361638]  ? trace_hardirqs_on+0x37/0xe0
[   14.361662]  ? __pfx_kasan_strings+0x10/0x10
[   14.361682]  ? finish_task_switch.isra.0+0x153/0x700
[   14.361705]  ? __switch_to+0x47/0xf50
[   14.361730]  ? __schedule+0x10cc/0x2b60
[   14.361765]  ? __pfx_read_tsc+0x10/0x10
[   14.361786]  ? ktime_get_ts64+0x86/0x230
[   14.361809]  kunit_try_run_case+0x1a5/0x480
[   14.361834]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.361856]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.361879]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.361903]  ? __kthread_parkme+0x82/0x180
[   14.361935]  ? preempt_count_sub+0x50/0x80
[   14.361958]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.361982]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.362007]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.362100]  kthread+0x337/0x6f0
[   14.362121]  ? trace_preempt_on+0x20/0xc0
[   14.362144]  ? __pfx_kthread+0x10/0x10
[   14.362165]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.362187]  ? calculate_sigpending+0x7b/0xa0
[   14.362211]  ? __pfx_kthread+0x10/0x10
[   14.362232]  ret_from_fork+0x116/0x1d0
[   14.362251]  ? __pfx_kthread+0x10/0x10
[   14.362271]  ret_from_fork_asm+0x1a/0x30
[   14.362303]  </TASK>
[   14.362313] 
[   14.376709] Allocated by task 276:
[   14.377041]  kasan_save_stack+0x45/0x70
[   14.377417]  kasan_save_track+0x18/0x40
[   14.377883]  kasan_save_alloc_info+0x3b/0x50
[   14.378499]  __kasan_kmalloc+0xb7/0xc0
[   14.378955]  __kmalloc_cache_noprof+0x189/0x420
[   14.379439]  kasan_strings+0xc0/0xe80
[   14.379735]  kunit_try_run_case+0x1a5/0x480
[   14.380161]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.380341]  kthread+0x337/0x6f0
[   14.380457]  ret_from_fork+0x116/0x1d0
[   14.380586]  ret_from_fork_asm+0x1a/0x30
[   14.380722] 
[   14.380809] Freed by task 276:
[   14.380917]  kasan_save_stack+0x45/0x70
[   14.381186]  kasan_save_track+0x18/0x40
[   14.381384]  kasan_save_free_info+0x3f/0x60
[   14.381591]  __kasan_slab_free+0x56/0x70
[   14.381799]  kfree+0x222/0x3f0
[   14.381952]  kasan_strings+0x2aa/0xe80
[   14.382309]  kunit_try_run_case+0x1a5/0x480
[   14.382467]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.382643]  kthread+0x337/0x6f0
[   14.382759]  ret_from_fork+0x116/0x1d0
[   14.382936]  ret_from_fork_asm+0x1a/0x30
[   14.383156] 
[   14.383252] The buggy address belongs to the object at ffff888102a16ac0
[   14.383252]  which belongs to the cache kmalloc-32 of size 32
[   14.383916] The buggy address is located 16 bytes inside of
[   14.383916]  freed 32-byte region [ffff888102a16ac0, ffff888102a16ae0)
[   14.384453] 
[   14.384526] The buggy address belongs to the physical page:
[   14.384823] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a16
[   14.385326] flags: 0x200000000000000(node=0|zone=2)
[   14.385481] page_type: f5(slab)
[   14.385634] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.386008] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.386395] page dumped because: kasan: bad access detected
[   14.386648] 
[   14.386741] Memory state around the buggy address:
[   14.386965]  ffff888102a16980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.387306]  ffff888102a16a00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.387620] >ffff888102a16a80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.387957]                                                  ^
[   14.388127]  ffff888102a16b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.388883]  ffff888102a16b80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.389347] ==================================================================