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

Environment
qemu-arm64
qemu-x86_64

[   18.537945] ==================================================================
[   18.538290] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   18.538520] Write of size 8 at addr fff00000c648f478 by task kunit_try_catch/281
[   18.538730] 
[   18.538781] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   18.539138] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.539243] Hardware name: linux,dummy-virt (DT)
[   18.539357] Call trace:
[   18.539413]  show_stack+0x20/0x38 (C)
[   18.539526]  dump_stack_lvl+0x8c/0xd0
[   18.539615]  print_report+0x118/0x5d0
[   18.539696]  kasan_report+0xdc/0x128
[   18.539888]  kasan_check_range+0x100/0x1a8
[   18.539961]  __kasan_check_write+0x20/0x30
[   18.540290]  copy_to_kernel_nofault+0x8c/0x250
[   18.540361]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   18.540494]  kunit_try_run_case+0x170/0x3f0
[   18.540579]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.540740]  kthread+0x328/0x630
[   18.540828]  ret_from_fork+0x10/0x20
[   18.540904] 
[   18.541232] Allocated by task 281:
[   18.541293]  kasan_save_stack+0x3c/0x68
[   18.541437]  kasan_save_track+0x20/0x40
[   18.541517]  kasan_save_alloc_info+0x40/0x58
[   18.541644]  __kasan_kmalloc+0xd4/0xd8
[   18.541721]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.542056]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.542146]  kunit_try_run_case+0x170/0x3f0
[   18.542275]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.542351]  kthread+0x328/0x630
[   18.542403]  ret_from_fork+0x10/0x20
[   18.542451] 
[   18.542473] The buggy address belongs to the object at fff00000c648f400
[   18.542473]  which belongs to the cache kmalloc-128 of size 128
[   18.542538] The buggy address is located 0 bytes to the right of
[   18.542538]  allocated 120-byte region [fff00000c648f400, fff00000c648f478)
[   18.542606] 
[   18.542682] The buggy address belongs to the physical page:
[   18.542734] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10648f
[   18.542807] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.542872] page_type: f5(slab)
[   18.542914] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.542969] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.543012] page dumped because: kasan: bad access detected
[   18.543057] 
[   18.543086] Memory state around the buggy address:
[   18.543136]  fff00000c648f300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.543182]  fff00000c648f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.543229] >fff00000c648f400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.543271]                                                                 ^
[   18.543321]  fff00000c648f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.543368]  fff00000c648f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.543409] ==================================================================
[   18.529641] ==================================================================
[   18.529735] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   18.529807] Read of size 8 at addr fff00000c648f478 by task kunit_try_catch/281
[   18.529884] 
[   18.529928] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   18.530026] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.530252] Hardware name: linux,dummy-virt (DT)
[   18.530400] Call trace:
[   18.530447]  show_stack+0x20/0x38 (C)
[   18.530509]  dump_stack_lvl+0x8c/0xd0
[   18.530890]  print_report+0x118/0x5d0
[   18.531004]  kasan_report+0xdc/0x128
[   18.531162]  __asan_report_load8_noabort+0x20/0x30
[   18.531248]  copy_to_kernel_nofault+0x204/0x250
[   18.531550]  copy_to_kernel_nofault_oob+0x158/0x418
[   18.531603]  kunit_try_run_case+0x170/0x3f0
[   18.531762]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.532149]  kthread+0x328/0x630
[   18.532231]  ret_from_fork+0x10/0x20
[   18.532437] 
[   18.532506] Allocated by task 281:
[   18.532617]  kasan_save_stack+0x3c/0x68
[   18.532700]  kasan_save_track+0x20/0x40
[   18.533093]  kasan_save_alloc_info+0x40/0x58
[   18.533234]  __kasan_kmalloc+0xd4/0xd8
[   18.533304]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.533428]  copy_to_kernel_nofault_oob+0xc8/0x418
[   18.533518]  kunit_try_run_case+0x170/0x3f0
[   18.533654]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.533937]  kthread+0x328/0x630
[   18.534060]  ret_from_fork+0x10/0x20
[   18.534170] 
[   18.534230] The buggy address belongs to the object at fff00000c648f400
[   18.534230]  which belongs to the cache kmalloc-128 of size 128
[   18.534393] The buggy address is located 0 bytes to the right of
[   18.534393]  allocated 120-byte region [fff00000c648f400, fff00000c648f478)
[   18.534502] 
[   18.534879] The buggy address belongs to the physical page:
[   18.534942] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10648f
[   18.535130] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.535323] page_type: f5(slab)
[   18.535437] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.535546] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.535599] page dumped because: kasan: bad access detected
[   18.535724] 
[   18.535776] Memory state around the buggy address:
[   18.535841]  fff00000c648f300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.535960]  fff00000c648f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.536047] >fff00000c648f400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.536166]                                                                 ^
[   18.536242]  fff00000c648f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.536327]  fff00000c648f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.536644] ==================================================================

[   16.325936] ==================================================================
[   16.327189] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   16.327723] Read of size 8 at addr ffff888102b16478 by task kunit_try_catch/298
[   16.328019] 
[   16.328204] CPU: 0 UID: 0 PID: 298 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   16.328255] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.328269] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.328293] Call Trace:
[   16.328306]  <TASK>
[   16.328325]  dump_stack_lvl+0x73/0xb0
[   16.328356]  print_report+0xd1/0x610
[   16.328382]  ? __virt_addr_valid+0x1db/0x2d0
[   16.328407]  ? copy_to_kernel_nofault+0x225/0x260
[   16.328432]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.328456]  ? copy_to_kernel_nofault+0x225/0x260
[   16.328481]  kasan_report+0x141/0x180
[   16.328505]  ? copy_to_kernel_nofault+0x225/0x260
[   16.328535]  __asan_report_load8_noabort+0x18/0x20
[   16.328561]  copy_to_kernel_nofault+0x225/0x260
[   16.328587]  copy_to_kernel_nofault_oob+0x1ed/0x560
[   16.328612]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   16.328636]  ? finish_task_switch.isra.0+0x153/0x700
[   16.328660]  ? __schedule+0x10c6/0x2b60
[   16.328684]  ? trace_hardirqs_on+0x37/0xe0
[   16.328716]  ? __pfx_read_tsc+0x10/0x10
[   16.328739]  ? ktime_get_ts64+0x86/0x230
[   16.328764]  kunit_try_run_case+0x1a5/0x480
[   16.328792]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.328826]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.328858]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.328883]  ? __kthread_parkme+0x82/0x180
[   16.328905]  ? preempt_count_sub+0x50/0x80
[   16.328929]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.328955]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.328979]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.329005]  kthread+0x337/0x6f0
[   16.329025]  ? trace_preempt_on+0x20/0xc0
[   16.329049]  ? __pfx_kthread+0x10/0x10
[   16.329071]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.329093]  ? calculate_sigpending+0x7b/0xa0
[   16.329119]  ? __pfx_kthread+0x10/0x10
[   16.329154]  ret_from_fork+0x116/0x1d0
[   16.329174]  ? __pfx_kthread+0x10/0x10
[   16.329196]  ret_from_fork_asm+0x1a/0x30
[   16.329235]  </TASK>
[   16.329247] 
[   16.339114] Allocated by task 298:
[   16.339249]  kasan_save_stack+0x45/0x70
[   16.339396]  kasan_save_track+0x18/0x40
[   16.339535]  kasan_save_alloc_info+0x3b/0x50
[   16.339701]  __kasan_kmalloc+0xb7/0xc0
[   16.339901]  __kmalloc_cache_noprof+0x189/0x420
[   16.340158]  copy_to_kernel_nofault_oob+0x12f/0x560
[   16.340396]  kunit_try_run_case+0x1a5/0x480
[   16.340573]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.340752]  kthread+0x337/0x6f0
[   16.340894]  ret_from_fork+0x116/0x1d0
[   16.341030]  ret_from_fork_asm+0x1a/0x30
[   16.341394] 
[   16.341491] The buggy address belongs to the object at ffff888102b16400
[   16.341491]  which belongs to the cache kmalloc-128 of size 128
[   16.342045] The buggy address is located 0 bytes to the right of
[   16.342045]  allocated 120-byte region [ffff888102b16400, ffff888102b16478)
[   16.342562] 
[   16.342662] The buggy address belongs to the physical page:
[   16.342968] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b16
[   16.343347] flags: 0x200000000000000(node=0|zone=2)
[   16.343570] page_type: f5(slab)
[   16.343710] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.344004] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.344599] page dumped because: kasan: bad access detected
[   16.344829] 
[   16.344934] Memory state around the buggy address:
[   16.345141]  ffff888102b16300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.345361]  ffff888102b16380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.345581] >ffff888102b16400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.345798]                                                                 ^
[   16.346325]  ffff888102b16480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.346600]  ffff888102b16500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.346824] ==================================================================
[   16.347429] ==================================================================
[   16.347783] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   16.348225] Write of size 8 at addr ffff888102b16478 by task kunit_try_catch/298
[   16.348564] 
[   16.348675] CPU: 0 UID: 0 PID: 298 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   16.348717] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.348730] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.348753] Call Trace:
[   16.348766]  <TASK>
[   16.348780]  dump_stack_lvl+0x73/0xb0
[   16.348809]  print_report+0xd1/0x610
[   16.348843]  ? __virt_addr_valid+0x1db/0x2d0
[   16.348871]  ? copy_to_kernel_nofault+0x99/0x260
[   16.348896]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.348919]  ? copy_to_kernel_nofault+0x99/0x260
[   16.348943]  kasan_report+0x141/0x180
[   16.348966]  ? copy_to_kernel_nofault+0x99/0x260
[   16.348995]  kasan_check_range+0x10c/0x1c0
[   16.349020]  __kasan_check_write+0x18/0x20
[   16.349040]  copy_to_kernel_nofault+0x99/0x260
[   16.349065]  copy_to_kernel_nofault_oob+0x288/0x560
[   16.349090]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   16.349114]  ? finish_task_switch.isra.0+0x153/0x700
[   16.349138]  ? __schedule+0x10c6/0x2b60
[   16.349160]  ? trace_hardirqs_on+0x37/0xe0
[   16.349191]  ? __pfx_read_tsc+0x10/0x10
[   16.349213]  ? ktime_get_ts64+0x86/0x230
[   16.349238]  kunit_try_run_case+0x1a5/0x480
[   16.349262]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.349286]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.349311]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.349335]  ? __kthread_parkme+0x82/0x180
[   16.349356]  ? preempt_count_sub+0x50/0x80
[   16.349380]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.349406]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.349447]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.349472]  kthread+0x337/0x6f0
[   16.349493]  ? trace_preempt_on+0x20/0xc0
[   16.349516]  ? __pfx_kthread+0x10/0x10
[   16.349538]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.349560]  ? calculate_sigpending+0x7b/0xa0
[   16.349584]  ? __pfx_kthread+0x10/0x10
[   16.349607]  ret_from_fork+0x116/0x1d0
[   16.349626]  ? __pfx_kthread+0x10/0x10
[   16.349648]  ret_from_fork_asm+0x1a/0x30
[   16.349679]  </TASK>
[   16.349691] 
[   16.357063] Allocated by task 298:
[   16.357194]  kasan_save_stack+0x45/0x70
[   16.357340]  kasan_save_track+0x18/0x40
[   16.357688]  kasan_save_alloc_info+0x3b/0x50
[   16.357914]  __kasan_kmalloc+0xb7/0xc0
[   16.358116]  __kmalloc_cache_noprof+0x189/0x420
[   16.358342]  copy_to_kernel_nofault_oob+0x12f/0x560
[   16.358584]  kunit_try_run_case+0x1a5/0x480
[   16.358954]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.359211]  kthread+0x337/0x6f0
[   16.359381]  ret_from_fork+0x116/0x1d0
[   16.359515]  ret_from_fork_asm+0x1a/0x30
[   16.359709] 
[   16.359882] The buggy address belongs to the object at ffff888102b16400
[   16.359882]  which belongs to the cache kmalloc-128 of size 128
[   16.360476] The buggy address is located 0 bytes to the right of
[   16.360476]  allocated 120-byte region [ffff888102b16400, ffff888102b16478)
[   16.361061] 
[   16.361160] The buggy address belongs to the physical page:
[   16.361425] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b16
[   16.361759] flags: 0x200000000000000(node=0|zone=2)
[   16.362057] page_type: f5(slab)
[   16.362209] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.362526] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.362782] page dumped because: kasan: bad access detected
[   16.363234] 
[   16.363333] Memory state around the buggy address:
[   16.363563]  ffff888102b16300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.363845]  ffff888102b16380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.364066] >ffff888102b16400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.364285]                                                                 ^
[   16.364501]  ffff888102b16480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.364723]  ffff888102b16500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.365068] ==================================================================