Hay
Date
Nov. 26, 2024, 6:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.285761] ==================================================================
[   34.287010] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   34.287812] Read of size 1 at addr fff00000c58bc818 by task kunit_try_catch/246
[   34.289999] 
[   34.290400] CPU: 1 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   34.291948] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.292603] Hardware name: linux,dummy-virt (DT)
[   34.293370] Call trace:
[   34.293880]  show_stack+0x20/0x38 (C)
[   34.294545]  dump_stack_lvl+0x8c/0xd0
[   34.295219]  print_report+0x118/0x5e0
[   34.295838]  kasan_report+0xc8/0x118
[   34.296559]  __asan_report_load1_noabort+0x20/0x30
[   34.297325]  memcmp+0x198/0x1d8
[   34.297948]  kasan_memcmp+0x16c/0x300
[   34.298563]  kunit_try_run_case+0x14c/0x3d0
[   34.299305]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.300092]  kthread+0x24c/0x2d0
[   34.300983]  ret_from_fork+0x10/0x20
[   34.301567] 
[   34.301986] Allocated by task 246:
[   34.302520]  kasan_save_stack+0x3c/0x68
[   34.303167]  kasan_save_track+0x20/0x40
[   34.303831]  kasan_save_alloc_info+0x40/0x58
[   34.304793]  __kasan_kmalloc+0xd4/0xd8
[   34.305451]  __kmalloc_cache_noprof+0x15c/0x3c8
[   34.306162]  kasan_memcmp+0xbc/0x300
[   34.306805]  kunit_try_run_case+0x14c/0x3d0
[   34.307441]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.308558]  kthread+0x24c/0x2d0
[   34.309162]  ret_from_fork+0x10/0x20
[   34.309643] 
[   34.310033] The buggy address belongs to the object at fff00000c58bc800
[   34.310033]  which belongs to the cache kmalloc-32 of size 32
[   34.312500] The buggy address is located 0 bytes to the right of
[   34.312500]  allocated 24-byte region [fff00000c58bc800, fff00000c58bc818)
[   34.314069] 
[   34.314338] The buggy address belongs to the physical page:
[   34.314829] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058bc
[   34.315979] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.318295] page_type: f5(slab)
[   34.319026] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   34.320017] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   34.321270] page dumped because: kasan: bad access detected
[   34.321893] 
[   34.322217] Memory state around the buggy address:
[   34.322836]  fff00000c58bc700: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   34.323542]  fff00000c58bc780: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   34.324645] >fff00000c58bc800: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.325406]                             ^
[   34.326021]  fff00000c58bc880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.326891]  fff00000c58bc900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.327705] ==================================================================

[   34.311627] ==================================================================
[   34.312642] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   34.313440] Read of size 1 at addr fff00000c5ec1c58 by task kunit_try_catch/246
[   34.314181] 
[   34.314604] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   34.315691] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.316309] Hardware name: linux,dummy-virt (DT)
[   34.317002] Call trace:
[   34.317476]  show_stack+0x20/0x38 (C)
[   34.319068]  dump_stack_lvl+0x8c/0xd0
[   34.319686]  print_report+0x118/0x5e0
[   34.320224]  kasan_report+0xc8/0x118
[   34.320895]  __asan_report_load1_noabort+0x20/0x30
[   34.321974]  memcmp+0x198/0x1d8
[   34.322560]  kasan_memcmp+0x16c/0x300
[   34.323188]  kunit_try_run_case+0x14c/0x3d0
[   34.323870]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.324498]  kthread+0x24c/0x2d0
[   34.325112]  ret_from_fork+0x10/0x20
[   34.326066] 
[   34.326443] Allocated by task 246:
[   34.326970]  kasan_save_stack+0x3c/0x68
[   34.327514]  kasan_save_track+0x20/0x40
[   34.328180]  kasan_save_alloc_info+0x40/0x58
[   34.328737]  __kasan_kmalloc+0xd4/0xd8
[   34.329405]  __kmalloc_cache_noprof+0x15c/0x3c8
[   34.330394]  kasan_memcmp+0xbc/0x300
[   34.331027]  kunit_try_run_case+0x14c/0x3d0
[   34.331713]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.332412]  kthread+0x24c/0x2d0
[   34.332956]  ret_from_fork+0x10/0x20
[   34.333543] 
[   34.334380] The buggy address belongs to the object at fff00000c5ec1c40
[   34.334380]  which belongs to the cache kmalloc-32 of size 32
[   34.335549] The buggy address is located 0 bytes to the right of
[   34.335549]  allocated 24-byte region [fff00000c5ec1c40, fff00000c5ec1c58)
[   34.336868] 
[   34.337255] The buggy address belongs to the physical page:
[   34.338358] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ec1
[   34.339387] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.340137] page_type: f5(slab)
[   34.340741] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   34.341574] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   34.342771] page dumped because: kasan: bad access detected
[   34.343379] 
[   34.343778] Memory state around the buggy address:
[   34.344451]  fff00000c5ec1b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   34.345215]  fff00000c5ec1b80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   34.346438] >fff00000c5ec1c00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   34.347251]                                                     ^
[   34.347931]  fff00000c5ec1c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.348840]  fff00000c5ec1d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.349905] ==================================================================

[   28.461972] ==================================================================
[   28.462613] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   28.462613] Read of size 1 at addr ffff8881028eaf58 by task kunit_try_catch/266
[   28.462613] 
[   28.462613] CPU: 0 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   28.462613] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.462613] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   28.462613] Call Trace:
[   28.462613]  <TASK>
[   28.462613]  dump_stack_lvl+0x73/0xb0
[   28.462613]  print_report+0xd1/0x640
[   28.462613]  ? __virt_addr_valid+0x1db/0x2d0
[   28.462613]  ? kasan_complete_mode_report_info+0x2a/0x200
[   28.462613]  kasan_report+0x102/0x140
[   28.462613]  ? memcmp+0x1b4/0x1d0
[   28.462613]  ? memcmp+0x1b4/0x1d0
[   28.462613]  __asan_report_load1_noabort+0x18/0x20
[   28.462613]  memcmp+0x1b4/0x1d0
[   28.462613]  kasan_memcmp+0x190/0x390
[   28.462613]  ? __pfx_kasan_memcmp+0x10/0x10
[   28.462613]  ? __switch_to+0x5d9/0xf60
[   28.462613]  ? ktime_get_ts64+0x84/0x230
[   28.462613]  kunit_try_run_case+0x1b3/0x490
[   28.462613]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.462613]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   28.462613]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   28.462613]  ? __kthread_parkme+0x82/0x160
[   28.462613]  ? preempt_count_sub+0x50/0x80
[   28.462613]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.462613]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   28.462613]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.462613]  kthread+0x257/0x310
[   28.462613]  ? __pfx_kthread+0x10/0x10
[   28.462613]  ret_from_fork+0x41/0x80
[   28.462613]  ? __pfx_kthread+0x10/0x10
[   28.462613]  ret_from_fork_asm+0x1a/0x30
[   28.462613]  </TASK>
[   28.462613] 
[   28.462613] Allocated by task 266:
[   28.462613]  kasan_save_stack+0x3d/0x60
[   28.462613]  kasan_save_track+0x18/0x40
[   28.462613]  kasan_save_alloc_info+0x3b/0x50
[   28.462613]  __kasan_kmalloc+0xb7/0xc0
[   28.462613]  __kmalloc_cache_noprof+0x184/0x410
[   28.462613]  kasan_memcmp+0xb8/0x390
[   28.462613]  kunit_try_run_case+0x1b3/0x490
[   28.462613]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.462613]  kthread+0x257/0x310
[   28.462613]  ret_from_fork+0x41/0x80
[   28.462613]  ret_from_fork_asm+0x1a/0x30
[   28.462613] 
[   28.462613] The buggy address belongs to the object at ffff8881028eaf40
[   28.462613]  which belongs to the cache kmalloc-32 of size 32
[   28.462613] The buggy address is located 0 bytes to the right of
[   28.462613]  allocated 24-byte region [ffff8881028eaf40, ffff8881028eaf58)
[   28.462613] 
[   28.462613] The buggy address belongs to the physical page:
[   28.462613] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028ea
[   28.462613] flags: 0x200000000000000(node=0|zone=2)
[   28.462613] page_type: f5(slab)
[   28.462613] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   28.462613] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   28.462613] page dumped because: kasan: bad access detected
[   28.462613] 
[   28.462613] Memory state around the buggy address:
[   28.462613]  ffff8881028eae00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   28.462613]  ffff8881028eae80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.462613] >ffff8881028eaf00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.462613]                                                     ^
[   28.462613]  ffff8881028eaf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.462613]  ffff8881028eb000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   28.462613] ==================================================================

[   23.370845] ==================================================================
[   23.372010] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   23.373017] Read of size 1 at addr ffff8881028c9198 by task kunit_try_catch/264
[   23.373534] 
[   23.373736] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   23.375439] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.375692] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.376808] Call Trace:
[   23.377126]  <TASK>
[   23.377427]  dump_stack_lvl+0x73/0xb0
[   23.377875]  print_report+0xd1/0x640
[   23.378231]  ? __virt_addr_valid+0x1db/0x2d0
[   23.378742]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.379113]  kasan_report+0x102/0x140
[   23.379537]  ? memcmp+0x1b4/0x1d0
[   23.379960]  ? memcmp+0x1b4/0x1d0
[   23.381280]  __asan_report_load1_noabort+0x18/0x20
[   23.381702]  memcmp+0x1b4/0x1d0
[   23.382382]  kasan_memcmp+0x190/0x390
[   23.382784]  ? trace_hardirqs_on+0x37/0xe0
[   23.383829]  ? __pfx_kasan_memcmp+0x10/0x10
[   23.384188]  ? finish_task_switch.isra.0+0x153/0x700
[   23.384898]  ? __switch_to+0x5d9/0xf60
[   23.385394]  ? __pfx_read_tsc+0x10/0x10
[   23.386315]  ? ktime_get_ts64+0x84/0x230
[   23.386731]  kunit_try_run_case+0x1b3/0x490
[   23.387058]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.387523]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   23.389307]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.389733]  ? __kthread_parkme+0x82/0x160
[   23.390105]  ? preempt_count_sub+0x50/0x80
[   23.391282]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.391986]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.392329]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.392906]  kthread+0x257/0x310
[   23.393272]  ? __pfx_kthread+0x10/0x10
[   23.393851]  ret_from_fork+0x41/0x80
[   23.394185]  ? __pfx_kthread+0x10/0x10
[   23.394793]  ret_from_fork_asm+0x1a/0x30
[   23.395280]  </TASK>
[   23.395478] 
[   23.396202] Allocated by task 264:
[   23.397179]  kasan_save_stack+0x3d/0x60
[   23.397732]  kasan_save_track+0x18/0x40
[   23.398355]  kasan_save_alloc_info+0x3b/0x50
[   23.398920]  __kasan_kmalloc+0xb7/0xc0
[   23.399624]  __kmalloc_cache_noprof+0x184/0x410
[   23.400634]  kasan_memcmp+0xb8/0x390
[   23.401164]  kunit_try_run_case+0x1b3/0x490
[   23.401611]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.402360]  kthread+0x257/0x310
[   23.402813]  ret_from_fork+0x41/0x80
[   23.403121]  ret_from_fork_asm+0x1a/0x30
[   23.403830] 
[   23.404528] The buggy address belongs to the object at ffff8881028c9180
[   23.404528]  which belongs to the cache kmalloc-32 of size 32
[   23.405382] The buggy address is located 0 bytes to the right of
[   23.405382]  allocated 24-byte region [ffff8881028c9180, ffff8881028c9198)
[   23.406758] 
[   23.407174] The buggy address belongs to the physical page:
[   23.407656] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028c9
[   23.408398] flags: 0x200000000000000(node=0|zone=2)
[   23.409298] page_type: f5(slab)
[   23.409913] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   23.410617] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   23.411461] page dumped because: kasan: bad access detected
[   23.412403] 
[   23.412719] Memory state around the buggy address:
[   23.413391]  ffff8881028c9080: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   23.414277]  ffff8881028c9100: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   23.414737] >ffff8881028c9180: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.415428]                             ^
[   23.416556]  ffff8881028c9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.417227]  ffff8881028c9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.417696] ==================================================================