Hay
Date
May 15, 2025, 10:38 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.755614] ==================================================================
[   20.756385] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   20.756475] Read of size 8 at addr fff00000c1729978 by task kunit_try_catch/281
[   20.756670] 
[   20.756708] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT 
[   20.756798] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.756828] Hardware name: linux,dummy-virt (DT)
[   20.756870] Call trace:
[   20.756896]  show_stack+0x20/0x38 (C)
[   20.757274]  dump_stack_lvl+0x8c/0xd0
[   20.757338]  print_report+0x118/0x608
[   20.757389]  kasan_report+0xdc/0x128
[   20.757802]  __asan_report_load8_noabort+0x20/0x30
[   20.757870]  copy_to_kernel_nofault+0x204/0x250
[   20.758062]  copy_to_kernel_nofault_oob+0x158/0x418
[   20.758193]  kunit_try_run_case+0x170/0x3f0
[   20.758244]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.758297]  kthread+0x328/0x630
[   20.758345]  ret_from_fork+0x10/0x20
[   20.758397] 
[   20.758698] Allocated by task 281:
[   20.758783]  kasan_save_stack+0x3c/0x68
[   20.758895]  kasan_save_track+0x20/0x40
[   20.758935]  kasan_save_alloc_info+0x40/0x58
[   20.758977]  __kasan_kmalloc+0xd4/0xd8
[   20.759014]  __kmalloc_cache_noprof+0x15c/0x3c0
[   20.759057]  copy_to_kernel_nofault_oob+0xc8/0x418
[   20.759097]  kunit_try_run_case+0x170/0x3f0
[   20.759136]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.759190]  kthread+0x328/0x630
[   20.759227]  ret_from_fork+0x10/0x20
[   20.759264] 
[   20.759289] The buggy address belongs to the object at fff00000c1729900
[   20.759289]  which belongs to the cache kmalloc-128 of size 128
[   20.759373] The buggy address is located 0 bytes to the right of
[   20.759373]  allocated 120-byte region [fff00000c1729900, fff00000c1729978)
[   20.759549] 
[   20.759622] The buggy address belongs to the physical page:
[   20.759719] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101729
[   20.759896] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.760138] page_type: f5(slab)
[   20.760203] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.760255] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.760297] page dumped because: kasan: bad access detected
[   20.760332] 
[   20.760354] Memory state around the buggy address:
[   20.760390]  fff00000c1729800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.761174]  fff00000c1729880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.761251] >fff00000c1729900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.761293]                                                                 ^
[   20.761711]  fff00000c1729980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.761815]  fff00000c1729a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.761857] ==================================================================
[   20.762782] ==================================================================
[   20.762874] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   20.763060] Write of size 8 at addr fff00000c1729978 by task kunit_try_catch/281
[   20.763209] 
[   20.763241] CPU: 0 UID: 0 PID: 281 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT 
[   20.763328] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.763357] Hardware name: linux,dummy-virt (DT)
[   20.763389] Call trace:
[   20.763423]  show_stack+0x20/0x38 (C)
[   20.763474]  dump_stack_lvl+0x8c/0xd0
[   20.763780]  print_report+0x118/0x608
[   20.763973]  kasan_report+0xdc/0x128
[   20.764023]  kasan_check_range+0x100/0x1a8
[   20.764229]  __kasan_check_write+0x20/0x30
[   20.764418]  copy_to_kernel_nofault+0x8c/0x250
[   20.764739]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   20.764848]  kunit_try_run_case+0x170/0x3f0
[   20.764931]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.764986]  kthread+0x328/0x630
[   20.765035]  ret_from_fork+0x10/0x20
[   20.765084] 
[   20.765112] Allocated by task 281:
[   20.765262]  kasan_save_stack+0x3c/0x68
[   20.765304]  kasan_save_track+0x20/0x40
[   20.765503]  kasan_save_alloc_info+0x40/0x58
[   20.765695]  __kasan_kmalloc+0xd4/0xd8
[   20.765931]  __kmalloc_cache_noprof+0x15c/0x3c0
[   20.766060]  copy_to_kernel_nofault_oob+0xc8/0x418
[   20.766118]  kunit_try_run_case+0x170/0x3f0
[   20.766175]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.766220]  kthread+0x328/0x630
[   20.766269]  ret_from_fork+0x10/0x20
[   20.766308] 
[   20.766423] The buggy address belongs to the object at fff00000c1729900
[   20.766423]  which belongs to the cache kmalloc-128 of size 128
[   20.766688] The buggy address is located 0 bytes to the right of
[   20.766688]  allocated 120-byte region [fff00000c1729900, fff00000c1729978)
[   20.766766] 
[   20.766788] The buggy address belongs to the physical page:
[   20.766824] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101729
[   20.766879] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.767484] page_type: f5(slab)
[   20.767577] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.767631] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.767847] page dumped because: kasan: bad access detected
[   20.768002] 
[   20.768123] Memory state around the buggy address:
[   20.768176]  fff00000c1729800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.768283]  fff00000c1729880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.768439] >fff00000c1729900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.768483]                                                                 ^
[   20.768526]  fff00000c1729980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.769055]  fff00000c1729a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.769168] ==================================================================


[   17.913727] ==================================================================
[   17.914147] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   17.914614] Read of size 8 at addr ffff888102b5b778 by task kunit_try_catch/299
[   17.915119] 
[   17.915263] CPU: 0 UID: 0 PID: 299 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) 
[   17.915325] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.915339] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.915365] Call Trace:
[   17.915383]  <TASK>
[   17.915406]  dump_stack_lvl+0x73/0xb0
[   17.915441]  print_report+0xd1/0x650
[   17.915604]  ? __virt_addr_valid+0x1db/0x2d0
[   17.915663]  ? copy_to_kernel_nofault+0x225/0x260
[   17.915691]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.915755]  ? copy_to_kernel_nofault+0x225/0x260
[   17.915785]  kasan_report+0x141/0x180
[   17.915810]  ? copy_to_kernel_nofault+0x225/0x260
[   17.915850]  __asan_report_load8_noabort+0x18/0x20
[   17.915873]  copy_to_kernel_nofault+0x225/0x260
[   17.915899]  copy_to_kernel_nofault_oob+0x1ed/0x560
[   17.915925]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   17.915949]  ? finish_task_switch.isra.0+0x153/0x700
[   17.915973]  ? __schedule+0x10cc/0x2b60
[   17.915996]  ? trace_hardirqs_on+0x37/0xe0
[   17.916028]  ? __pfx_read_tsc+0x10/0x10
[   17.916051]  ? ktime_get_ts64+0x86/0x230
[   17.916077]  kunit_try_run_case+0x1a5/0x480
[   17.916105]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.916127]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.916151]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.916173]  ? __kthread_parkme+0x82/0x180
[   17.916194]  ? preempt_count_sub+0x50/0x80
[   17.916217]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.916262]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.916286]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.916309]  kthread+0x337/0x6f0
[   17.916328]  ? trace_preempt_on+0x20/0xc0
[   17.916351]  ? __pfx_kthread+0x10/0x10
[   17.916373]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.916394]  ? calculate_sigpending+0x7b/0xa0
[   17.916421]  ? __pfx_kthread+0x10/0x10
[   17.916443]  ret_from_fork+0x116/0x1d0
[   17.916463]  ? __pfx_kthread+0x10/0x10
[   17.916484]  ret_from_fork_asm+0x1a/0x30
[   17.916520]  </TASK>
[   17.916535] 
[   17.924006] Allocated by task 299:
[   17.924202]  kasan_save_stack+0x45/0x70
[   17.924403]  kasan_save_track+0x18/0x40
[   17.924877]  kasan_save_alloc_info+0x3b/0x50
[   17.925007]  __kasan_kmalloc+0xb7/0xc0
[   17.925290]  __kmalloc_cache_noprof+0x189/0x420
[   17.925435]  copy_to_kernel_nofault_oob+0x12f/0x560
[   17.925696]  kunit_try_run_case+0x1a5/0x480
[   17.925850]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.926043]  kthread+0x337/0x6f0
[   17.926199]  ret_from_fork+0x116/0x1d0
[   17.926340]  ret_from_fork_asm+0x1a/0x30
[   17.926570] 
[   17.926630] The buggy address belongs to the object at ffff888102b5b700
[   17.926630]  which belongs to the cache kmalloc-128 of size 128
[   17.927032] The buggy address is located 0 bytes to the right of
[   17.927032]  allocated 120-byte region [ffff888102b5b700, ffff888102b5b778)
[   17.927793] 
[   17.927919] The buggy address belongs to the physical page:
[   17.928093] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b5b
[   17.928373] flags: 0x200000000000000(node=0|zone=2)
[   17.928573] page_type: f5(slab)
[   17.928770] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.928998] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.929244] page dumped because: kasan: bad access detected
[   17.929350] 
[   17.929527] Memory state around the buggy address:
[   17.929744]  ffff888102b5b600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.929999]  ffff888102b5b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.930132] >ffff888102b5b700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.930426]                                                                 ^
[   17.930942]  ffff888102b5b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.931174]  ffff888102b5b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.931365] ==================================================================
[   17.932081] ==================================================================
[   17.932622] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   17.932904] Write of size 8 at addr ffff888102b5b778 by task kunit_try_catch/299
[   17.933064] 
[   17.933145] CPU: 0 UID: 0 PID: 299 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) 
[   17.933204] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.933218] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.933253] Call Trace:
[   17.933269]  <TASK>
[   17.933292]  dump_stack_lvl+0x73/0xb0
[   17.933325]  print_report+0xd1/0x650
[   17.933351]  ? __virt_addr_valid+0x1db/0x2d0
[   17.933378]  ? copy_to_kernel_nofault+0x99/0x260
[   17.933402]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.933427]  ? copy_to_kernel_nofault+0x99/0x260
[   17.933533]  kasan_report+0x141/0x180
[   17.933564]  ? copy_to_kernel_nofault+0x99/0x260
[   17.933595]  kasan_check_range+0x10c/0x1c0
[   17.933621]  __kasan_check_write+0x18/0x20
[   17.933642]  copy_to_kernel_nofault+0x99/0x260
[   17.933669]  copy_to_kernel_nofault_oob+0x288/0x560
[   17.933694]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   17.933719]  ? finish_task_switch.isra.0+0x153/0x700
[   17.933745]  ? __schedule+0x10cc/0x2b60
[   17.933770]  ? trace_hardirqs_on+0x37/0xe0
[   17.933803]  ? __pfx_read_tsc+0x10/0x10
[   17.933825]  ? ktime_get_ts64+0x86/0x230
[   17.933851]  kunit_try_run_case+0x1a5/0x480
[   17.933878]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.933900]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.933925]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.933947]  ? __kthread_parkme+0x82/0x180
[   17.933969]  ? preempt_count_sub+0x50/0x80
[   17.933994]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.934019]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.934042]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.934065]  kthread+0x337/0x6f0
[   17.934085]  ? trace_preempt_on+0x20/0xc0
[   17.934108]  ? __pfx_kthread+0x10/0x10
[   17.934129]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.934150]  ? calculate_sigpending+0x7b/0xa0
[   17.934176]  ? __pfx_kthread+0x10/0x10
[   17.934198]  ret_from_fork+0x116/0x1d0
[   17.934218]  ? __pfx_kthread+0x10/0x10
[   17.934252]  ret_from_fork_asm+0x1a/0x30
[   17.934286]  </TASK>
[   17.934301] 
[   17.942396] Allocated by task 299:
[   17.943010]  kasan_save_stack+0x45/0x70
[   17.943364]  kasan_save_track+0x18/0x40
[   17.943698]  kasan_save_alloc_info+0x3b/0x50
[   17.944315]  __kasan_kmalloc+0xb7/0xc0
[   17.944633]  __kmalloc_cache_noprof+0x189/0x420
[   17.945186]  copy_to_kernel_nofault_oob+0x12f/0x560
[   17.945626]  kunit_try_run_case+0x1a5/0x480
[   17.945840]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.946048]  kthread+0x337/0x6f0
[   17.946142]  ret_from_fork+0x116/0x1d0
[   17.946373]  ret_from_fork_asm+0x1a/0x30
[   17.946691] 
[   17.947015] The buggy address belongs to the object at ffff888102b5b700
[   17.947015]  which belongs to the cache kmalloc-128 of size 128
[   17.947337] The buggy address is located 0 bytes to the right of
[   17.947337]  allocated 120-byte region [ffff888102b5b700, ffff888102b5b778)
[   17.947668] 
[   17.947775] The buggy address belongs to the physical page:
[   17.948119] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b5b
[   17.948571] flags: 0x200000000000000(node=0|zone=2)
[   17.948707] page_type: f5(slab)
[   17.948857] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.949260] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.949399] page dumped because: kasan: bad access detected
[   17.950139] 
[   17.950311] Memory state around the buggy address:
[   17.950650]  ffff888102b5b600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.950985]  ffff888102b5b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.951159] >ffff888102b5b700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.951346]                                                                 ^
[   17.951791]  ffff888102b5b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.952126]  ffff888102b5b800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.952383] ==================================================================