Hay
Date
July 2, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.150919] ==================================================================
[   33.151020] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   33.151097] Read of size 1 at addr fff00000c993b058 by task kunit_try_catch/290
[   33.151152] 
[   33.151206] CPU: 1 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250702 #1 PREEMPT 
[   33.151322] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.151354] Hardware name: linux,dummy-virt (DT)
[   33.151388] Call trace:
[   33.151415]  show_stack+0x20/0x38 (C)
[   33.151610]  dump_stack_lvl+0x8c/0xd0
[   33.151671]  print_report+0x118/0x608
[   33.152030]  kasan_report+0xdc/0x128
[   33.152114]  __asan_report_load1_noabort+0x20/0x30
[   33.152203]  memcmp+0x198/0x1d8
[   33.152332]  kasan_memcmp+0x16c/0x300
[   33.152436]  kunit_try_run_case+0x170/0x3f0
[   33.152548]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.152622]  kthread+0x328/0x630
[   33.152668]  ret_from_fork+0x10/0x20
[   33.152867] 
[   33.152889] Allocated by task 290:
[   33.152923]  kasan_save_stack+0x3c/0x68
[   33.152978]  kasan_save_track+0x20/0x40
[   33.153018]  kasan_save_alloc_info+0x40/0x58
[   33.153228]  __kasan_kmalloc+0xd4/0xd8
[   33.153277]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.153360]  kasan_memcmp+0xbc/0x300
[   33.153477]  kunit_try_run_case+0x170/0x3f0
[   33.153556]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.153688]  kthread+0x328/0x630
[   33.153748]  ret_from_fork+0x10/0x20
[   33.153826] 
[   33.153944] The buggy address belongs to the object at fff00000c993b040
[   33.153944]  which belongs to the cache kmalloc-32 of size 32
[   33.154038] The buggy address is located 0 bytes to the right of
[   33.154038]  allocated 24-byte region [fff00000c993b040, fff00000c993b058)
[   33.154141] 
[   33.154165] The buggy address belongs to the physical page:
[   33.154198] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10993b
[   33.154541] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.154687] page_type: f5(slab)
[   33.154777] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   33.154852] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   33.155198] page dumped because: kasan: bad access detected
[   33.155381] 
[   33.155460] Memory state around the buggy address:
[   33.155518]  fff00000c993af00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.155599]  fff00000c993af80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   33.155687] >fff00000c993b000: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   33.155779]                                                     ^
[   33.155906]  fff00000c993b080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.156010]  fff00000c993b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.156103] ==================================================================

[   25.229535] ==================================================================
[   25.229932] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   25.230840] Read of size 1 at addr ffff888105a1bd18 by task kunit_try_catch/306
[   25.231668] 
[   25.232101] CPU: 0 UID: 0 PID: 306 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250702 #1 PREEMPT(voluntary) 
[   25.232202] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.232218] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.232249] Call Trace:
[   25.232266]  <TASK>
[   25.232287]  dump_stack_lvl+0x73/0xb0
[   25.232321]  print_report+0xd1/0x650
[   25.232349]  ? __virt_addr_valid+0x1db/0x2d0
[   25.232375]  ? memcmp+0x1b4/0x1d0
[   25.232397]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.232424]  ? memcmp+0x1b4/0x1d0
[   25.232445]  kasan_report+0x141/0x180
[   25.232466]  ? memcmp+0x1b4/0x1d0
[   25.232491]  __asan_report_load1_noabort+0x18/0x20
[   25.232515]  memcmp+0x1b4/0x1d0
[   25.232538]  kasan_memcmp+0x18f/0x390
[   25.232558]  ? trace_hardirqs_on+0x37/0xe0
[   25.232584]  ? __pfx_kasan_memcmp+0x10/0x10
[   25.232603]  ? finish_task_switch.isra.0+0x153/0x700
[   25.232627]  ? __switch_to+0x47/0xf50
[   25.232657]  ? __pfx_read_tsc+0x10/0x10
[   25.232679]  ? ktime_get_ts64+0x86/0x230
[   25.232706]  kunit_try_run_case+0x1a5/0x480
[   25.232733]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.232757]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.232782]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.232806]  ? __kthread_parkme+0x82/0x180
[   25.232829]  ? preempt_count_sub+0x50/0x80
[   25.232852]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.232877]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.232902]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.232943]  kthread+0x337/0x6f0
[   25.232963]  ? trace_preempt_on+0x20/0xc0
[   25.232985]  ? __pfx_kthread+0x10/0x10
[   25.233006]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.233030]  ? calculate_sigpending+0x7b/0xa0
[   25.233055]  ? __pfx_kthread+0x10/0x10
[   25.233087]  ret_from_fork+0x116/0x1d0
[   25.233105]  ? __pfx_kthread+0x10/0x10
[   25.233126]  ret_from_fork_asm+0x1a/0x30
[   25.233158]  </TASK>
[   25.233172] 
[   25.241007] Allocated by task 306:
[   25.241246]  kasan_save_stack+0x45/0x70
[   25.241572]  kasan_save_track+0x18/0x40
[   25.241764]  kasan_save_alloc_info+0x3b/0x50
[   25.241940]  __kasan_kmalloc+0xb7/0xc0
[   25.242075]  __kmalloc_cache_noprof+0x189/0x420
[   25.242604]  kasan_memcmp+0xb7/0x390
[   25.242789]  kunit_try_run_case+0x1a5/0x480
[   25.242968]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.243335]  kthread+0x337/0x6f0
[   25.243481]  ret_from_fork+0x116/0x1d0
[   25.243699]  ret_from_fork_asm+0x1a/0x30
[   25.243887] 
[   25.244009] The buggy address belongs to the object at ffff888105a1bd00
[   25.244009]  which belongs to the cache kmalloc-32 of size 32
[   25.244630] The buggy address is located 0 bytes to the right of
[   25.244630]  allocated 24-byte region [ffff888105a1bd00, ffff888105a1bd18)
[   25.245409] 
[   25.245484] The buggy address belongs to the physical page:
[   25.245663] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a1b
[   25.246009] flags: 0x200000000000000(node=0|zone=2)
[   25.246247] page_type: f5(slab)
[   25.246412] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.246722] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.247171] page dumped because: kasan: bad access detected
[   25.247530] 
[   25.247620] Memory state around the buggy address:
[   25.247834]  ffff888105a1bc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.248424]  ffff888105a1bc80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   25.248789] >ffff888105a1bd00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.249172]                             ^
[   25.249389]  ffff888105a1bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.249595]  ffff888105a1be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.249954] ==================================================================

[   24.981748] ==================================================================
[   24.982116] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   24.982340] Read of size 1 at addr ffff8881058a9398 by task kunit_try_catch/305
[   24.982752] 
[   24.982921] CPU: 0 UID: 0 PID: 305 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250702 #1 PREEMPT(voluntary) 
[   24.983035] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.983049] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.983073] Call Trace:
[   24.983085]  <TASK>
[   24.983101]  dump_stack_lvl+0x73/0xb0
[   24.983128]  print_report+0xd1/0x650
[   24.983150]  ? __virt_addr_valid+0x1db/0x2d0
[   24.983173]  ? memcmp+0x1b4/0x1d0
[   24.983194]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.983219]  ? memcmp+0x1b4/0x1d0
[   24.983241]  kasan_report+0x141/0x180
[   24.983262]  ? memcmp+0x1b4/0x1d0
[   24.983287]  __asan_report_load1_noabort+0x18/0x20
[   24.983324]  memcmp+0x1b4/0x1d0
[   24.983347]  kasan_memcmp+0x18f/0x390
[   24.983367]  ? trace_hardirqs_on+0x37/0xe0
[   24.983389]  ? __pfx_kasan_memcmp+0x10/0x10
[   24.983409]  ? finish_task_switch.isra.0+0x153/0x700
[   24.983430]  ? __switch_to+0x47/0xf50
[   24.983459]  ? __pfx_read_tsc+0x10/0x10
[   24.983481]  ? ktime_get_ts64+0x86/0x230
[   24.983504]  kunit_try_run_case+0x1a5/0x480
[   24.983529]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.983552]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.983573]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.983595]  ? __kthread_parkme+0x82/0x180
[   24.983627]  ? preempt_count_sub+0x50/0x80
[   24.983650]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.983718]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.983746]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.983770]  kthread+0x337/0x6f0
[   24.983790]  ? trace_preempt_on+0x20/0xc0
[   24.983812]  ? __pfx_kthread+0x10/0x10
[   24.983833]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.983858]  ? calculate_sigpending+0x7b/0xa0
[   24.983881]  ? __pfx_kthread+0x10/0x10
[   24.983903]  ret_from_fork+0x116/0x1d0
[   24.983921]  ? __pfx_kthread+0x10/0x10
[   24.983942]  ret_from_fork_asm+0x1a/0x30
[   24.983973]  </TASK>
[   24.983985] 
[   24.997083] Allocated by task 305:
[   24.997287]  kasan_save_stack+0x45/0x70
[   24.997438]  kasan_save_track+0x18/0x40
[   24.997596]  kasan_save_alloc_info+0x3b/0x50
[   24.998038]  __kasan_kmalloc+0xb7/0xc0
[   24.998399]  __kmalloc_cache_noprof+0x189/0x420
[   24.998899]  kasan_memcmp+0xb7/0x390
[   24.999235]  kunit_try_run_case+0x1a5/0x480
[   24.999650]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.999937]  kthread+0x337/0x6f0
[   25.000053]  ret_from_fork+0x116/0x1d0
[   25.000175]  ret_from_fork_asm+0x1a/0x30
[   25.000304] 
[   25.000378] The buggy address belongs to the object at ffff8881058a9380
[   25.000378]  which belongs to the cache kmalloc-32 of size 32
[   25.001031] The buggy address is located 0 bytes to the right of
[   25.001031]  allocated 24-byte region [ffff8881058a9380, ffff8881058a9398)
[   25.001407] 
[   25.001480] The buggy address belongs to the physical page:
[   25.002025] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9
[   25.002727] flags: 0x200000000000000(node=0|zone=2)
[   25.003251] page_type: f5(slab)
[   25.003559] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.004154] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.004380] page dumped because: kasan: bad access detected
[   25.004567] 
[   25.004716] Memory state around the buggy address:
[   25.005181]  ffff8881058a9280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   25.005998]  ffff8881058a9300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.006639] >ffff8881058a9380: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.007373]                             ^
[   25.007640]  ffff8881058a9400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.008220]  ffff8881058a9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.008433] ==================================================================