Hay
Date
July 3, 2025, 6:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.149863] ==================================================================
[   19.149922] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   19.149973] Read of size 1 at addr fff00000c7832b50 by task kunit_try_catch/259
[   19.150192] 
[   19.150228] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.150543] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.150651] Hardware name: linux,dummy-virt (DT)
[   19.150686] Call trace:
[   19.150791]  show_stack+0x20/0x38 (C)
[   19.150843]  dump_stack_lvl+0x8c/0xd0
[   19.151088]  print_report+0x118/0x608
[   19.151172]  kasan_report+0xdc/0x128
[   19.151307]  __asan_report_load1_noabort+0x20/0x30
[   19.151466]  kasan_strings+0x95c/0xb00
[   19.151533]  kunit_try_run_case+0x170/0x3f0
[   19.151584]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.151639]  kthread+0x328/0x630
[   19.151744]  ret_from_fork+0x10/0x20
[   19.151794] 
[   19.151816] Allocated by task 259:
[   19.151873]  kasan_save_stack+0x3c/0x68
[   19.152176]  kasan_save_track+0x20/0x40
[   19.152221]  kasan_save_alloc_info+0x40/0x58
[   19.152460]  __kasan_kmalloc+0xd4/0xd8
[   19.152800]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.153166]  kasan_strings+0xc8/0xb00
[   19.153319]  kunit_try_run_case+0x170/0x3f0
[   19.153457]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.153790]  kthread+0x328/0x630
[   19.153956]  ret_from_fork+0x10/0x20
[   19.154108] 
[   19.154214] Freed by task 259:
[   19.154381]  kasan_save_stack+0x3c/0x68
[   19.154450]  kasan_save_track+0x20/0x40
[   19.154514]  kasan_save_free_info+0x4c/0x78
[   19.154815]  __kasan_slab_free+0x6c/0x98
[   19.155115]  kfree+0x214/0x3c8
[   19.155242]  kasan_strings+0x24c/0xb00
[   19.155319]  kunit_try_run_case+0x170/0x3f0
[   19.155387]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.155597]  kthread+0x328/0x630
[   19.155892]  ret_from_fork+0x10/0x20
[   19.156069] 
[   19.156190] The buggy address belongs to the object at fff00000c7832b40
[   19.156190]  which belongs to the cache kmalloc-32 of size 32
[   19.156297] The buggy address is located 16 bytes inside of
[   19.156297]  freed 32-byte region [fff00000c7832b40, fff00000c7832b60)
[   19.156552] 
[   19.156881] The buggy address belongs to the physical page:
[   19.157071] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107832
[   19.157163] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.157415] page_type: f5(slab)
[   19.157689] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.157806] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.157941] page dumped because: kasan: bad access detected
[   19.158095] 
[   19.158179] Memory state around the buggy address:
[   19.158220]  fff00000c7832a00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.158275]  fff00000c7832a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.158644] >fff00000c7832b00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.158761]                                                  ^
[   19.158863]  fff00000c7832b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.158950]  fff00000c7832c00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.159095] ==================================================================

[   13.358865] ==================================================================
[   13.359759] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.360015] Read of size 1 at addr ffff8881038e6250 by task kunit_try_catch/277
[   13.360641] 
[   13.360748] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.360791] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.360802] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.360822] Call Trace:
[   13.360838]  <TASK>
[   13.360852]  dump_stack_lvl+0x73/0xb0
[   13.360879]  print_report+0xd1/0x650
[   13.360901]  ? __virt_addr_valid+0x1db/0x2d0
[   13.360924]  ? kasan_strings+0xcbc/0xe80
[   13.360945]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.360967]  ? kasan_strings+0xcbc/0xe80
[   13.360987]  kasan_report+0x141/0x180
[   13.361008]  ? kasan_strings+0xcbc/0xe80
[   13.361033]  __asan_report_load1_noabort+0x18/0x20
[   13.361058]  kasan_strings+0xcbc/0xe80
[   13.361077]  ? trace_hardirqs_on+0x37/0xe0
[   13.361111]  ? __pfx_kasan_strings+0x10/0x10
[   13.361131]  ? finish_task_switch.isra.0+0x153/0x700
[   13.361151]  ? __switch_to+0x47/0xf50
[   13.361174]  ? __schedule+0x10cc/0x2b60
[   13.361196]  ? __pfx_read_tsc+0x10/0x10
[   13.361217]  ? ktime_get_ts64+0x86/0x230
[   13.361240]  kunit_try_run_case+0x1a5/0x480
[   13.361262]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.361284]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.361304]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.361327]  ? __kthread_parkme+0x82/0x180
[   13.361346]  ? preempt_count_sub+0x50/0x80
[   13.361368]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.361391]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.361413]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.361436]  kthread+0x337/0x6f0
[   13.361455]  ? trace_preempt_on+0x20/0xc0
[   13.361477]  ? __pfx_kthread+0x10/0x10
[   13.361499]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.361520]  ? calculate_sigpending+0x7b/0xa0
[   13.361543]  ? __pfx_kthread+0x10/0x10
[   13.361563]  ret_from_fork+0x116/0x1d0
[   13.361581]  ? __pfx_kthread+0x10/0x10
[   13.361675]  ret_from_fork_asm+0x1a/0x30
[   13.361707]  </TASK>
[   13.361718] 
[   13.372308] Allocated by task 277:
[   13.372487]  kasan_save_stack+0x45/0x70
[   13.372678]  kasan_save_track+0x18/0x40
[   13.372853]  kasan_save_alloc_info+0x3b/0x50
[   13.373050]  __kasan_kmalloc+0xb7/0xc0
[   13.373362]  __kmalloc_cache_noprof+0x189/0x420
[   13.373573]  kasan_strings+0xc0/0xe80
[   13.373744]  kunit_try_run_case+0x1a5/0x480
[   13.373930]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.374210]  kthread+0x337/0x6f0
[   13.374433]  ret_from_fork+0x116/0x1d0
[   13.374592]  ret_from_fork_asm+0x1a/0x30
[   13.374767] 
[   13.374856] Freed by task 277:
[   13.374998]  kasan_save_stack+0x45/0x70
[   13.376123]  kasan_save_track+0x18/0x40
[   13.376292]  kasan_save_free_info+0x3f/0x60
[   13.376449]  __kasan_slab_free+0x56/0x70
[   13.376591]  kfree+0x222/0x3f0
[   13.376711]  kasan_strings+0x2aa/0xe80
[   13.376847]  kunit_try_run_case+0x1a5/0x480
[   13.376997]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.377795]  kthread+0x337/0x6f0
[   13.377966]  ret_from_fork+0x116/0x1d0
[   13.378412]  ret_from_fork_asm+0x1a/0x30
[   13.378571] 
[   13.378734] The buggy address belongs to the object at ffff8881038e6240
[   13.378734]  which belongs to the cache kmalloc-32 of size 32
[   13.379340] The buggy address is located 16 bytes inside of
[   13.379340]  freed 32-byte region [ffff8881038e6240, ffff8881038e6260)
[   13.379804] 
[   13.379895] The buggy address belongs to the physical page:
[   13.380142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038e6
[   13.381485] flags: 0x200000000000000(node=0|zone=2)
[   13.381821] page_type: f5(slab)
[   13.382410] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.382761] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.383074] page dumped because: kasan: bad access detected
[   13.383273] 
[   13.383359] Memory state around the buggy address:
[   13.383624]  ffff8881038e6100: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   13.383952]  ffff8881038e6180: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   13.384192] >ffff8881038e6200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   13.384474]                                                  ^
[   13.384693]  ffff8881038e6280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.385007]  ffff8881038e6300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   13.385857] ==================================================================