Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.542876] ==================================================================
[   18.542945] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   18.543208] Write of size 8 at addr fff00000c7025d78 by task kunit_try_catch/281
[   18.543467] 
[   18.543515] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.543744] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.543812] Hardware name: linux,dummy-virt (DT)
[   18.543926] Call trace:
[   18.543986]  show_stack+0x20/0x38 (C)
[   18.544088]  dump_stack_lvl+0x8c/0xd0
[   18.544153]  print_report+0x118/0x5d0
[   18.544616]  kasan_report+0xdc/0x128
[   18.544821]  kasan_check_range+0x100/0x1a8
[   18.544930]  __kasan_check_write+0x20/0x30
[   18.545027]  copy_to_kernel_nofault+0x8c/0x250
[   18.545340]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   18.545545]  kunit_try_run_case+0x170/0x3f0
[   18.546082]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.546462]  kthread+0x328/0x630
[   18.546525]  ret_from_fork+0x10/0x20
[   18.546621] 
[   18.546743] Allocated by task 281:
[   18.546811]  kasan_save_stack+0x3c/0x68
[   18.546875]  kasan_save_track+0x20/0x40
[   18.547234]  kasan_save_alloc_info+0x40/0x58
[   18.547598]  __kasan_kmalloc+0xd4/0xd8
[   18.547711]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.548170]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.548551]  kunit_try_run_case+0x170/0x3f0
[   18.548788]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.548907]  kthread+0x328/0x630
[   18.549041]  ret_from_fork+0x10/0x20
[   18.549187] 
[   18.549267] The buggy address belongs to the object at fff00000c7025d00
[   18.549267]  which belongs to the cache kmalloc-128 of size 128
[   18.549393] The buggy address is located 0 bytes to the right of
[   18.549393]  allocated 120-byte region [fff00000c7025d00, fff00000c7025d78)
[   18.549483] 
[   18.549782] The buggy address belongs to the physical page:
[   18.549942] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107025
[   18.550011] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.550270] page_type: f5(slab)
[   18.550323] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.550537] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.550772] page dumped because: kasan: bad access detected
[   18.551040] 
[   18.551280] Memory state around the buggy address:
[   18.551351]  fff00000c7025c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.551413]  fff00000c7025c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.551884] >fff00000c7025d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.551999]                                                                 ^
[   18.552050]  fff00000c7025d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.552539]  fff00000c7025e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.552851] ==================================================================
[   18.536119] ==================================================================
[   18.536398] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   18.536478] Read of size 8 at addr fff00000c7025d78 by task kunit_try_catch/281
[   18.536533] 
[   18.536573] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.537287] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.537365] Hardware name: linux,dummy-virt (DT)
[   18.537431] Call trace:
[   18.537469]  show_stack+0x20/0x38 (C)
[   18.537526]  dump_stack_lvl+0x8c/0xd0
[   18.537755]  print_report+0x118/0x5d0
[   18.538013]  kasan_report+0xdc/0x128
[   18.538095]  __asan_report_load8_noabort+0x20/0x30
[   18.538211]  copy_to_kernel_nofault+0x204/0x250
[   18.538266]  copy_to_kernel_nofault_oob+0x158/0x418
[   18.538318]  kunit_try_run_case+0x170/0x3f0
[   18.538788]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.538889]  kthread+0x328/0x630
[   18.538974]  ret_from_fork+0x10/0x20
[   18.539027] 
[   18.539158] Allocated by task 281:
[   18.539194]  kasan_save_stack+0x3c/0x68
[   18.539239]  kasan_save_track+0x20/0x40
[   18.539485]  kasan_save_alloc_info+0x40/0x58
[   18.539795]  __kasan_kmalloc+0xd4/0xd8
[   18.540050]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.540249]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.540412]  kunit_try_run_case+0x170/0x3f0
[   18.540458]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.540504]  kthread+0x328/0x630
[   18.540538]  ret_from_fork+0x10/0x20
[   18.540577] 
[   18.540600] The buggy address belongs to the object at fff00000c7025d00
[   18.540600]  which belongs to the cache kmalloc-128 of size 128
[   18.540674] The buggy address is located 0 bytes to the right of
[   18.540674]  allocated 120-byte region [fff00000c7025d00, fff00000c7025d78)
[   18.540742] 
[   18.540859] The buggy address belongs to the physical page:
[   18.540913] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107025
[   18.541005] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.541069] page_type: f5(slab)
[   18.541130] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.541194] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.541253] page dumped because: kasan: bad access detected
[   18.541296] 
[   18.541336] Memory state around the buggy address:
[   18.541384]  fff00000c7025c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.541439]  fff00000c7025c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.541482] >fff00000c7025d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.541523]                                                                 ^
[   18.541576]  fff00000c7025d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.541621]  fff00000c7025e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.541947] ==================================================================

[   16.285257] ==================================================================
[   16.286395] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   16.286703] Write of size 8 at addr ffff888102ad4d78 by task kunit_try_catch/299
[   16.287396] 
[   16.287648] CPU: 0 UID: 0 PID: 299 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.287811] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.287825] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.287862] Call Trace:
[   16.287875]  <TASK>
[   16.287930]  dump_stack_lvl+0x73/0xb0
[   16.287963]  print_report+0xd1/0x610
[   16.287985]  ? __virt_addr_valid+0x1db/0x2d0
[   16.288008]  ? copy_to_kernel_nofault+0x99/0x260
[   16.288032]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.288054]  ? copy_to_kernel_nofault+0x99/0x260
[   16.288078]  kasan_report+0x141/0x180
[   16.288100]  ? copy_to_kernel_nofault+0x99/0x260
[   16.288128]  kasan_check_range+0x10c/0x1c0
[   16.288153]  __kasan_check_write+0x18/0x20
[   16.288172]  copy_to_kernel_nofault+0x99/0x260
[   16.288196]  copy_to_kernel_nofault_oob+0x288/0x560
[   16.288220]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   16.288243]  ? finish_task_switch.isra.0+0x153/0x700
[   16.288265]  ? __schedule+0x10cc/0x2b60
[   16.288286]  ? trace_hardirqs_on+0x37/0xe0
[   16.288316]  ? __pfx_read_tsc+0x10/0x10
[   16.288338]  ? ktime_get_ts64+0x86/0x230
[   16.288372]  kunit_try_run_case+0x1a5/0x480
[   16.288395]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.288418]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.288441]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.288464]  ? __kthread_parkme+0x82/0x180
[   16.288483]  ? preempt_count_sub+0x50/0x80
[   16.288505]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.288530]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.288554]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.288577]  kthread+0x337/0x6f0
[   16.288596]  ? trace_preempt_on+0x20/0xc0
[   16.288618]  ? __pfx_kthread+0x10/0x10
[   16.288639]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.288660]  ? calculate_sigpending+0x7b/0xa0
[   16.288694]  ? __pfx_kthread+0x10/0x10
[   16.288715]  ret_from_fork+0x116/0x1d0
[   16.288735]  ? __pfx_kthread+0x10/0x10
[   16.288755]  ret_from_fork_asm+0x1a/0x30
[   16.288786]  </TASK>
[   16.288796] 
[   16.303017] Allocated by task 299:
[   16.303202]  kasan_save_stack+0x45/0x70
[   16.303397]  kasan_save_track+0x18/0x40
[   16.304047]  kasan_save_alloc_info+0x3b/0x50
[   16.304323]  __kasan_kmalloc+0xb7/0xc0
[   16.304751]  __kmalloc_cache_noprof+0x189/0x420
[   16.304988]  copy_to_kernel_nofault_oob+0x12f/0x560
[   16.305192]  kunit_try_run_case+0x1a5/0x480
[   16.305598]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.306135]  kthread+0x337/0x6f0
[   16.306312]  ret_from_fork+0x116/0x1d0
[   16.306678]  ret_from_fork_asm+0x1a/0x30
[   16.307019] 
[   16.307120] The buggy address belongs to the object at ffff888102ad4d00
[   16.307120]  which belongs to the cache kmalloc-128 of size 128
[   16.308141] The buggy address is located 0 bytes to the right of
[   16.308141]  allocated 120-byte region [ffff888102ad4d00, ffff888102ad4d78)
[   16.309147] 
[   16.309244] The buggy address belongs to the physical page:
[   16.309779] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad4
[   16.310137] flags: 0x200000000000000(node=0|zone=2)
[   16.310351] page_type: f5(slab)
[   16.310609] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.311326] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.311936] page dumped because: kasan: bad access detected
[   16.312420] 
[   16.312672] Memory state around the buggy address:
[   16.313019]  ffff888102ad4c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.313297]  ffff888102ad4c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.314051] >ffff888102ad4d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.314547]                                                                 ^
[   16.314983]  ffff888102ad4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.315280]  ffff888102ad4e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.315901] ==================================================================
[   16.253127] ==================================================================
[   16.253881] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   16.254523] Read of size 8 at addr ffff888102ad4d78 by task kunit_try_catch/299
[   16.255272] 
[   16.255562] CPU: 0 UID: 0 PID: 299 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.255618] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.255760] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.255786] Call Trace:
[   16.255801]  <TASK>
[   16.255819]  dump_stack_lvl+0x73/0xb0
[   16.255854]  print_report+0xd1/0x610
[   16.255879]  ? __virt_addr_valid+0x1db/0x2d0
[   16.255915]  ? copy_to_kernel_nofault+0x225/0x260
[   16.255939]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.255961]  ? copy_to_kernel_nofault+0x225/0x260
[   16.255986]  kasan_report+0x141/0x180
[   16.256008]  ? copy_to_kernel_nofault+0x225/0x260
[   16.256036]  __asan_report_load8_noabort+0x18/0x20
[   16.256062]  copy_to_kernel_nofault+0x225/0x260
[   16.256087]  copy_to_kernel_nofault_oob+0x1ed/0x560
[   16.256111]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   16.256134]  ? finish_task_switch.isra.0+0x153/0x700
[   16.256158]  ? __schedule+0x10cc/0x2b60
[   16.256180]  ? trace_hardirqs_on+0x37/0xe0
[   16.256212]  ? __pfx_read_tsc+0x10/0x10
[   16.256234]  ? ktime_get_ts64+0x86/0x230
[   16.256259]  kunit_try_run_case+0x1a5/0x480
[   16.256285]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.256308]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.256332]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.256355]  ? __kthread_parkme+0x82/0x180
[   16.256376]  ? preempt_count_sub+0x50/0x80
[   16.256399]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.256423]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.256447]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.256471]  kthread+0x337/0x6f0
[   16.256491]  ? trace_preempt_on+0x20/0xc0
[   16.256513]  ? __pfx_kthread+0x10/0x10
[   16.256534]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.256555]  ? calculate_sigpending+0x7b/0xa0
[   16.256580]  ? __pfx_kthread+0x10/0x10
[   16.256601]  ret_from_fork+0x116/0x1d0
[   16.256620]  ? __pfx_kthread+0x10/0x10
[   16.256641]  ret_from_fork_asm+0x1a/0x30
[   16.256672]  </TASK>
[   16.256684] 
[   16.269803] Allocated by task 299:
[   16.270203]  kasan_save_stack+0x45/0x70
[   16.270625]  kasan_save_track+0x18/0x40
[   16.271134]  kasan_save_alloc_info+0x3b/0x50
[   16.271515]  __kasan_kmalloc+0xb7/0xc0
[   16.271901]  __kmalloc_cache_noprof+0x189/0x420
[   16.272294]  copy_to_kernel_nofault_oob+0x12f/0x560
[   16.272996]  kunit_try_run_case+0x1a5/0x480
[   16.273217]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.273717]  kthread+0x337/0x6f0
[   16.274095]  ret_from_fork+0x116/0x1d0
[   16.274541]  ret_from_fork_asm+0x1a/0x30
[   16.274927] 
[   16.275238] The buggy address belongs to the object at ffff888102ad4d00
[   16.275238]  which belongs to the cache kmalloc-128 of size 128
[   16.275939] The buggy address is located 0 bytes to the right of
[   16.275939]  allocated 120-byte region [ffff888102ad4d00, ffff888102ad4d78)
[   16.276775] 
[   16.277189] The buggy address belongs to the physical page:
[   16.277784] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ad4
[   16.278507] flags: 0x200000000000000(node=0|zone=2)
[   16.278950] page_type: f5(slab)
[   16.279353] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.280057] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.280680] page dumped because: kasan: bad access detected
[   16.280937] 
[   16.281029] Memory state around the buggy address:
[   16.281237]  ffff888102ad4c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.281880]  ffff888102ad4c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.282516] >ffff888102ad4d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.283214]                                                                 ^
[   16.283768]  ffff888102ad4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.284062]  ffff888102ad4e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.284343] ==================================================================