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

Environment
qemu-arm64
qemu-x86_64

[   18.522496] ==================================================================
[   18.522547] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   18.522699] Write of size 8 at addr fff00000c65eeb78 by task kunit_try_catch/282
[   18.522829] 
[   18.522866] CPU: 0 UID: 0 PID: 282 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.523042] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.523072] Hardware name: linux,dummy-virt (DT)
[   18.523105] Call trace:
[   18.523129]  show_stack+0x20/0x38 (C)
[   18.523177]  dump_stack_lvl+0x8c/0xd0
[   18.523226]  print_report+0x118/0x5d0
[   18.523293]  kasan_report+0xdc/0x128
[   18.523340]  kasan_check_range+0x100/0x1a8
[   18.523390]  __kasan_check_write+0x20/0x30
[   18.523443]  copy_to_kernel_nofault+0x8c/0x250
[   18.523494]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   18.523543]  kunit_try_run_case+0x170/0x3f0
[   18.523592]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.523645]  kthread+0x328/0x630
[   18.523688]  ret_from_fork+0x10/0x20
[   18.523748] 
[   18.523770] Allocated by task 282:
[   18.523798]  kasan_save_stack+0x3c/0x68
[   18.523840]  kasan_save_track+0x20/0x40
[   18.523878]  kasan_save_alloc_info+0x40/0x58
[   18.523920]  __kasan_kmalloc+0xd4/0xd8
[   18.523957]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.524070]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.524394]  kunit_try_run_case+0x170/0x3f0
[   18.524478]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.524522]  kthread+0x328/0x630
[   18.524648]  ret_from_fork+0x10/0x20
[   18.524827] 
[   18.524849] The buggy address belongs to the object at fff00000c65eeb00
[   18.524849]  which belongs to the cache kmalloc-128 of size 128
[   18.524910] The buggy address is located 0 bytes to the right of
[   18.524910]  allocated 120-byte region [fff00000c65eeb00, fff00000c65eeb78)
[   18.524988] 
[   18.525008] The buggy address belongs to the physical page:
[   18.525041] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065ee
[   18.525096] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.525145] page_type: f5(slab)
[   18.525185] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.525279] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.525323] page dumped because: kasan: bad access detected
[   18.525356] 
[   18.525375] Memory state around the buggy address:
[   18.525409]  fff00000c65eea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.525456]  fff00000c65eea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.525502] >fff00000c65eeb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.525557]                                                                 ^
[   18.525666]  fff00000c65eeb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.525712]  fff00000c65eec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.525754] ==================================================================
[   18.518239] ==================================================================
[   18.518299] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   18.518360] Read of size 8 at addr fff00000c65eeb78 by task kunit_try_catch/282
[   18.518412] 
[   18.518446] CPU: 0 UID: 0 PID: 282 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.518535] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.518565] Hardware name: linux,dummy-virt (DT)
[   18.518598] Call trace:
[   18.518622]  show_stack+0x20/0x38 (C)
[   18.518673]  dump_stack_lvl+0x8c/0xd0
[   18.518990]  print_report+0x118/0x5d0
[   18.519049]  kasan_report+0xdc/0x128
[   18.519212]  __asan_report_load8_noabort+0x20/0x30
[   18.519266]  copy_to_kernel_nofault+0x204/0x250
[   18.519322]  copy_to_kernel_nofault_oob+0x158/0x418
[   18.519501]  kunit_try_run_case+0x170/0x3f0
[   18.519560]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.519823]  kthread+0x328/0x630
[   18.519866]  ret_from_fork+0x10/0x20
[   18.519914] 
[   18.519934] Allocated by task 282:
[   18.519966]  kasan_save_stack+0x3c/0x68
[   18.520019]  kasan_save_track+0x20/0x40
[   18.520066]  kasan_save_alloc_info+0x40/0x58
[   18.520141]  __kasan_kmalloc+0xd4/0xd8
[   18.520295]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.520509]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.520586]  kunit_try_run_case+0x170/0x3f0
[   18.520742]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.520860]  kthread+0x328/0x630
[   18.520893]  ret_from_fork+0x10/0x20
[   18.520932] 
[   18.520953] The buggy address belongs to the object at fff00000c65eeb00
[   18.520953]  which belongs to the cache kmalloc-128 of size 128
[   18.521025] The buggy address is located 0 bytes to the right of
[   18.521025]  allocated 120-byte region [fff00000c65eeb00, fff00000c65eeb78)
[   18.521092] 
[   18.521116] The buggy address belongs to the physical page:
[   18.521150] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065ee
[   18.521207] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.521258] page_type: f5(slab)
[   18.521298] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.521351] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.521393] page dumped because: kasan: bad access detected
[   18.521427] 
[   18.521462] Memory state around the buggy address:
[   18.521607]  fff00000c65eea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.521730]  fff00000c65eea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.521776] >fff00000c65eeb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.521818]                                                                 ^
[   18.521944]  fff00000c65eeb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.522002]  fff00000c65eec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.522045] ==================================================================

[   17.118835] ==================================================================
[   17.119188] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   17.119706] Write of size 8 at addr ffff8881039b9578 by task kunit_try_catch/298
[   17.119942] 
[   17.120052] CPU: 0 UID: 0 PID: 298 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   17.120129] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.120142] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.120162] Call Trace:
[   17.120176]  <TASK>
[   17.120192]  dump_stack_lvl+0x73/0xb0
[   17.120221]  print_report+0xd1/0x610
[   17.120299]  ? __virt_addr_valid+0x1db/0x2d0
[   17.120324]  ? copy_to_kernel_nofault+0x99/0x260
[   17.120350]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.120376]  ? copy_to_kernel_nofault+0x99/0x260
[   17.120402]  kasan_report+0x141/0x180
[   17.120425]  ? copy_to_kernel_nofault+0x99/0x260
[   17.120455]  kasan_check_range+0x10c/0x1c0
[   17.120480]  __kasan_check_write+0x18/0x20
[   17.120501]  copy_to_kernel_nofault+0x99/0x260
[   17.120600]  copy_to_kernel_nofault_oob+0x288/0x560
[   17.120627]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   17.120653]  ? finish_task_switch.isra.0+0x153/0x700
[   17.120679]  ? __schedule+0x10cc/0x2b60
[   17.120702]  ? trace_hardirqs_on+0x37/0xe0
[   17.120734]  ? __pfx_read_tsc+0x10/0x10
[   17.120756]  ? ktime_get_ts64+0x86/0x230
[   17.120781]  kunit_try_run_case+0x1a5/0x480
[   17.120807]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.120831]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.120855]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.120882]  ? __kthread_parkme+0x82/0x180
[   17.120904]  ? preempt_count_sub+0x50/0x80
[   17.120928]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.120977]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.121004]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.121031]  kthread+0x337/0x6f0
[   17.121051]  ? trace_preempt_on+0x20/0xc0
[   17.121075]  ? __pfx_kthread+0x10/0x10
[   17.121096]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.121119]  ? calculate_sigpending+0x7b/0xa0
[   17.121144]  ? __pfx_kthread+0x10/0x10
[   17.121186]  ret_from_fork+0x116/0x1d0
[   17.121206]  ? __pfx_kthread+0x10/0x10
[   17.121228]  ret_from_fork_asm+0x1a/0x30
[   17.121259]  </TASK>
[   17.121314] 
[   17.131912] Allocated by task 298:
[   17.132127]  kasan_save_stack+0x45/0x70
[   17.132387]  kasan_save_track+0x18/0x40
[   17.132533]  kasan_save_alloc_info+0x3b/0x50
[   17.132701]  __kasan_kmalloc+0xb7/0xc0
[   17.132890]  __kmalloc_cache_noprof+0x189/0x420
[   17.133153]  copy_to_kernel_nofault_oob+0x12f/0x560
[   17.133578]  kunit_try_run_case+0x1a5/0x480
[   17.133754]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.133933]  kthread+0x337/0x6f0
[   17.134105]  ret_from_fork+0x116/0x1d0
[   17.134567]  ret_from_fork_asm+0x1a/0x30
[   17.134780] 
[   17.134860] The buggy address belongs to the object at ffff8881039b9500
[   17.134860]  which belongs to the cache kmalloc-128 of size 128
[   17.135476] The buggy address is located 0 bytes to the right of
[   17.135476]  allocated 120-byte region [ffff8881039b9500, ffff8881039b9578)
[   17.136309] 
[   17.136404] The buggy address belongs to the physical page:
[   17.136655] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b9
[   17.136900] flags: 0x200000000000000(node=0|zone=2)
[   17.137159] page_type: f5(slab)
[   17.137461] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.137841] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.138145] page dumped because: kasan: bad access detected
[   17.138329] 
[   17.138423] Memory state around the buggy address:
[   17.138843]  ffff8881039b9400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.139167]  ffff8881039b9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.139428] >ffff8881039b9500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.139857]                                                                 ^
[   17.140135]  ffff8881039b9580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.140591]  ffff8881039b9600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.140869] ==================================================================
[   17.098036] ==================================================================
[   17.098769] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   17.099077] Read of size 8 at addr ffff8881039b9578 by task kunit_try_catch/298
[   17.099560] 
[   17.099744] CPU: 0 UID: 0 PID: 298 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   17.099797] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.099810] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.099834] Call Trace:
[   17.099849]  <TASK>
[   17.099867]  dump_stack_lvl+0x73/0xb0
[   17.099902]  print_report+0xd1/0x610
[   17.099928]  ? __virt_addr_valid+0x1db/0x2d0
[   17.099953]  ? copy_to_kernel_nofault+0x225/0x260
[   17.099979]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.100004]  ? copy_to_kernel_nofault+0x225/0x260
[   17.100030]  kasan_report+0x141/0x180
[   17.100053]  ? copy_to_kernel_nofault+0x225/0x260
[   17.100089]  __asan_report_load8_noabort+0x18/0x20
[   17.100117]  copy_to_kernel_nofault+0x225/0x260
[   17.100144]  copy_to_kernel_nofault_oob+0x1ed/0x560
[   17.100170]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   17.100196]  ? finish_task_switch.isra.0+0x153/0x700
[   17.100222]  ? __schedule+0x10cc/0x2b60
[   17.100319]  ? trace_hardirqs_on+0x37/0xe0
[   17.100376]  ? __pfx_read_tsc+0x10/0x10
[   17.100401]  ? ktime_get_ts64+0x86/0x230
[   17.100429]  kunit_try_run_case+0x1a5/0x480
[   17.100456]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.100497]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.100524]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.100570]  ? __kthread_parkme+0x82/0x180
[   17.100595]  ? preempt_count_sub+0x50/0x80
[   17.100619]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.100644]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.100671]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.100698]  kthread+0x337/0x6f0
[   17.100719]  ? trace_preempt_on+0x20/0xc0
[   17.100742]  ? __pfx_kthread+0x10/0x10
[   17.100764]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.100788]  ? calculate_sigpending+0x7b/0xa0
[   17.100813]  ? __pfx_kthread+0x10/0x10
[   17.100836]  ret_from_fork+0x116/0x1d0
[   17.100856]  ? __pfx_kthread+0x10/0x10
[   17.100878]  ret_from_fork_asm+0x1a/0x30
[   17.100911]  </TASK>
[   17.100925] 
[   17.109193] Allocated by task 298:
[   17.109411]  kasan_save_stack+0x45/0x70
[   17.109707]  kasan_save_track+0x18/0x40
[   17.110000]  kasan_save_alloc_info+0x3b/0x50
[   17.110201]  __kasan_kmalloc+0xb7/0xc0
[   17.110404]  __kmalloc_cache_noprof+0x189/0x420
[   17.110725]  copy_to_kernel_nofault_oob+0x12f/0x560
[   17.110963]  kunit_try_run_case+0x1a5/0x480
[   17.111165]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.111447]  kthread+0x337/0x6f0
[   17.111768]  ret_from_fork+0x116/0x1d0
[   17.111963]  ret_from_fork_asm+0x1a/0x30
[   17.112165] 
[   17.112279] The buggy address belongs to the object at ffff8881039b9500
[   17.112279]  which belongs to the cache kmalloc-128 of size 128
[   17.112734] The buggy address is located 0 bytes to the right of
[   17.112734]  allocated 120-byte region [ffff8881039b9500, ffff8881039b9578)
[   17.113395] 
[   17.113517] The buggy address belongs to the physical page:
[   17.113785] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039b9
[   17.114163] flags: 0x200000000000000(node=0|zone=2)
[   17.114501] page_type: f5(slab)
[   17.114796] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.115042] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.115378] page dumped because: kasan: bad access detected
[   17.115716] 
[   17.115812] Memory state around the buggy address:
[   17.115972]  ffff8881039b9400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.116200]  ffff8881039b9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.116421] >ffff8881039b9500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.116739]                                                                 ^
[   17.117088]  ffff8881039b9580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.117412]  ffff8881039b9600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.117909] ==================================================================