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

Environment
qemu-arm64
qemu-x86_64

[   20.449789] ==================================================================
[   20.449848] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8
[   20.449901] Read of size 1 at addr fff00000c78cc650 by task kunit_try_catch/259
[   20.449953] 
[   20.450137] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.450283] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.450312] Hardware name: linux,dummy-virt (DT)
[   20.450729] Call trace:
[   20.450848]  show_stack+0x20/0x38 (C)
[   20.450904]  dump_stack_lvl+0x8c/0xd0
[   20.450950]  print_report+0x118/0x608
[   20.451561]  kasan_report+0xdc/0x128
[   20.451809]  __asan_report_load1_noabort+0x20/0x30
[   20.451940]  strcmp+0xc0/0xc8
[   20.451987]  kasan_strings+0x340/0xb00
[   20.452465]  kunit_try_run_case+0x170/0x3f0
[   20.452532]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.452589]  kthread+0x328/0x630
[   20.452646]  ret_from_fork+0x10/0x20
[   20.452812] 
[   20.452844] Allocated by task 259:
[   20.453190]  kasan_save_stack+0x3c/0x68
[   20.453296]  kasan_save_track+0x20/0x40
[   20.453337]  kasan_save_alloc_info+0x40/0x58
[   20.453378]  __kasan_kmalloc+0xd4/0xd8
[   20.453423]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.453464]  kasan_strings+0xc8/0xb00
[   20.453616]  kunit_try_run_case+0x170/0x3f0
[   20.453805]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.453938]  kthread+0x328/0x630
[   20.454012]  ret_from_fork+0x10/0x20
[   20.454094] 
[   20.454141] Freed by task 259:
[   20.454206]  kasan_save_stack+0x3c/0x68
[   20.454331]  kasan_save_track+0x20/0x40
[   20.454405]  kasan_save_free_info+0x4c/0x78
[   20.454452]  __kasan_slab_free+0x6c/0x98
[   20.454490]  kfree+0x214/0x3c8
[   20.454526]  kasan_strings+0x24c/0xb00
[   20.454565]  kunit_try_run_case+0x170/0x3f0
[   20.454644]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.454871]  kthread+0x328/0x630
[   20.454908]  ret_from_fork+0x10/0x20
[   20.454947] 
[   20.454969] The buggy address belongs to the object at fff00000c78cc640
[   20.454969]  which belongs to the cache kmalloc-32 of size 32
[   20.455068] The buggy address is located 16 bytes inside of
[   20.455068]  freed 32-byte region [fff00000c78cc640, fff00000c78cc660)
[   20.455165] 
[   20.455188] The buggy address belongs to the physical page:
[   20.455220] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cc
[   20.455343] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.456130] page_type: f5(slab)
[   20.456308] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.456588] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.456664] page dumped because: kasan: bad access detected
[   20.456743] 
[   20.456770] Memory state around the buggy address:
[   20.456814]  fff00000c78cc500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.456881]  fff00000c78cc580: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   20.456926] >fff00000c78cc600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.456966]                                                  ^
[   20.457002]  fff00000c78cc680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.457711]  fff00000c78cc700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.457778] ==================================================================

[   15.713324] ==================================================================
[   15.714408] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   15.714745] Read of size 1 at addr ffff888102a0d790 by task kunit_try_catch/277
[   15.715231] 
[   15.715362] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   15.715420] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.715434] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.715461] Call Trace:
[   15.715477]  <TASK>
[   15.715499]  dump_stack_lvl+0x73/0xb0
[   15.715536]  print_report+0xd1/0x650
[   15.715566]  ? __virt_addr_valid+0x1db/0x2d0
[   15.715595]  ? strcmp+0xb0/0xc0
[   15.715619]  ? kasan_complete_mode_report_info+0x64/0x200
[   15.715646]  ? strcmp+0xb0/0xc0
[   15.715671]  kasan_report+0x141/0x180
[   15.715697]  ? strcmp+0xb0/0xc0
[   15.715727]  __asan_report_load1_noabort+0x18/0x20
[   15.715755]  strcmp+0xb0/0xc0
[   15.715782]  kasan_strings+0x431/0xe80
[   15.715821]  ? trace_hardirqs_on+0x37/0xe0
[   15.715849]  ? __pfx_kasan_strings+0x10/0x10
[   15.715874]  ? finish_task_switch.isra.0+0x153/0x700
[   15.715900]  ? __switch_to+0x47/0xf50
[   15.715929]  ? __schedule+0x10cc/0x2b60
[   15.715955]  ? __pfx_read_tsc+0x10/0x10
[   15.715980]  ? ktime_get_ts64+0x86/0x230
[   15.716008]  kunit_try_run_case+0x1a5/0x480
[   15.716038]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.716063]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.716091]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.716119]  ? __kthread_parkme+0x82/0x180
[   15.716212]  ? preempt_count_sub+0x50/0x80
[   15.716244]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.716272]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.716299]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.716326]  kthread+0x337/0x6f0
[   15.716350]  ? trace_preempt_on+0x20/0xc0
[   15.716377]  ? __pfx_kthread+0x10/0x10
[   15.716401]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.716428]  ? calculate_sigpending+0x7b/0xa0
[   15.716456]  ? __pfx_kthread+0x10/0x10
[   15.716481]  ret_from_fork+0x116/0x1d0
[   15.716505]  ? __pfx_kthread+0x10/0x10
[   15.716529]  ret_from_fork_asm+0x1a/0x30
[   15.716565]  </TASK>
[   15.716580] 
[   15.727298] Allocated by task 277:
[   15.727523]  kasan_save_stack+0x45/0x70
[   15.727756]  kasan_save_track+0x18/0x40
[   15.727932]  kasan_save_alloc_info+0x3b/0x50
[   15.728136]  __kasan_kmalloc+0xb7/0xc0
[   15.728368]  __kmalloc_cache_noprof+0x189/0x420
[   15.728625]  kasan_strings+0xc0/0xe80
[   15.728829]  kunit_try_run_case+0x1a5/0x480
[   15.729018]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.729271]  kthread+0x337/0x6f0
[   15.729479]  ret_from_fork+0x116/0x1d0
[   15.729782]  ret_from_fork_asm+0x1a/0x30
[   15.729965] 
[   15.730049] Freed by task 277:
[   15.730219]  kasan_save_stack+0x45/0x70
[   15.730529]  kasan_save_track+0x18/0x40
[   15.730741]  kasan_save_free_info+0x3f/0x60
[   15.730968]  __kasan_slab_free+0x56/0x70
[   15.731276]  kfree+0x222/0x3f0
[   15.731478]  kasan_strings+0x2aa/0xe80
[   15.731674]  kunit_try_run_case+0x1a5/0x480
[   15.731920]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.732337]  kthread+0x337/0x6f0
[   15.732503]  ret_from_fork+0x116/0x1d0
[   15.732725]  ret_from_fork_asm+0x1a/0x30
[   15.732943] 
[   15.733047] The buggy address belongs to the object at ffff888102a0d780
[   15.733047]  which belongs to the cache kmalloc-32 of size 32
[   15.733461] The buggy address is located 16 bytes inside of
[   15.733461]  freed 32-byte region [ffff888102a0d780, ffff888102a0d7a0)
[   15.734145] 
[   15.734267] The buggy address belongs to the physical page:
[   15.734481] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a0d
[   15.734760] flags: 0x200000000000000(node=0|zone=2)
[   15.735048] page_type: f5(slab)
[   15.735375] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   15.735780] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.736276] page dumped because: kasan: bad access detected
[   15.736485] 
[   15.736567] Memory state around the buggy address:
[   15.736798]  ffff888102a0d680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.737167]  ffff888102a0d700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.737606] >ffff888102a0d780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.737859]                          ^
[   15.738356]  ffff888102a0d800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.739298]  ffff888102a0d880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.739567] ==================================================================