Hay
Date
July 3, 2025, 10:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.173745] ==================================================================
[   34.174143] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   34.174269] Read of size 8 at addr fff00000c5a89478 by task kunit_try_catch/313
[   34.174604] 
[   34.174647] CPU: 0 UID: 0 PID: 313 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   34.174740] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.175328] Hardware name: linux,dummy-virt (DT)
[   34.175408] Call trace:
[   34.175449]  show_stack+0x20/0x38 (C)
[   34.176010]  dump_stack_lvl+0x8c/0xd0
[   34.176329]  print_report+0x118/0x608
[   34.176451]  kasan_report+0xdc/0x128
[   34.176605]  __asan_report_load8_noabort+0x20/0x30
[   34.176828]  copy_to_kernel_nofault+0x204/0x250
[   34.176904]  copy_to_kernel_nofault_oob+0x158/0x418
[   34.177255]  kunit_try_run_case+0x170/0x3f0
[   34.177392]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.177535]  kthread+0x328/0x630
[   34.177606]  ret_from_fork+0x10/0x20
[   34.177740] 
[   34.177809] Allocated by task 313:
[   34.177932]  kasan_save_stack+0x3c/0x68
[   34.178031]  kasan_save_track+0x20/0x40
[   34.178112]  kasan_save_alloc_info+0x40/0x58
[   34.178153]  __kasan_kmalloc+0xd4/0xd8
[   34.178193]  __kmalloc_cache_noprof+0x16c/0x3c0
[   34.178246]  copy_to_kernel_nofault_oob+0xc8/0x418
[   34.178288]  kunit_try_run_case+0x170/0x3f0
[   34.178331]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.178399]  kthread+0x328/0x630
[   34.178437]  ret_from_fork+0x10/0x20
[   34.178475] 
[   34.178499] The buggy address belongs to the object at fff00000c5a89400
[   34.178499]  which belongs to the cache kmalloc-128 of size 128
[   34.178568] The buggy address is located 0 bytes to the right of
[   34.178568]  allocated 120-byte region [fff00000c5a89400, fff00000c5a89478)
[   34.178647] 
[   34.178681] The buggy address belongs to the physical page:
[   34.178725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a89
[   34.178784] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.178856] page_type: f5(slab)
[   34.178908] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   34.178968] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   34.179011] page dumped because: kasan: bad access detected
[   34.179046] 
[   34.179066] Memory state around the buggy address:
[   34.179122]  fff00000c5a89300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   34.179168]  fff00000c5a89380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.179223] >fff00000c5a89400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   34.179274]                                                                 ^
[   34.179328]  fff00000c5a89480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.179374]  fff00000c5a89500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.179416] ==================================================================
[   34.181341] ==================================================================
[   34.181522] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   34.181640] Write of size 8 at addr fff00000c5a89478 by task kunit_try_catch/313
[   34.181997] 
[   34.182213] CPU: 0 UID: 0 PID: 313 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   34.182353] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.182394] Hardware name: linux,dummy-virt (DT)
[   34.182816] Call trace:
[   34.182890]  show_stack+0x20/0x38 (C)
[   34.182957]  dump_stack_lvl+0x8c/0xd0
[   34.183008]  print_report+0x118/0x608
[   34.183180]  kasan_report+0xdc/0x128
[   34.183245]  kasan_check_range+0x100/0x1a8
[   34.183297]  __kasan_check_write+0x20/0x30
[   34.183415]  copy_to_kernel_nofault+0x8c/0x250
[   34.183860]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   34.183937]  kunit_try_run_case+0x170/0x3f0
[   34.183991]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.184084]  kthread+0x328/0x630
[   34.184160]  ret_from_fork+0x10/0x20
[   34.184223] 
[   34.184701] Allocated by task 313:
[   34.184760]  kasan_save_stack+0x3c/0x68
[   34.184819]  kasan_save_track+0x20/0x40
[   34.184874]  kasan_save_alloc_info+0x40/0x58
[   34.185264]  __kasan_kmalloc+0xd4/0xd8
[   34.185386]  __kmalloc_cache_noprof+0x16c/0x3c0
[   34.185431]  copy_to_kernel_nofault_oob+0xc8/0x418
[   34.185667]  kunit_try_run_case+0x170/0x3f0
[   34.185985]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.186135]  kthread+0x328/0x630
[   34.186336]  ret_from_fork+0x10/0x20
[   34.186500] 
[   34.186605] The buggy address belongs to the object at fff00000c5a89400
[   34.186605]  which belongs to the cache kmalloc-128 of size 128
[   34.186672] The buggy address is located 0 bytes to the right of
[   34.186672]  allocated 120-byte region [fff00000c5a89400, fff00000c5a89478)
[   34.186924] 
[   34.187001] The buggy address belongs to the physical page:
[   34.187176] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a89
[   34.187285] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.187532] page_type: f5(slab)
[   34.187713] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   34.187927] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   34.188210] page dumped because: kasan: bad access detected
[   34.188253] 
[   34.188273] Memory state around the buggy address:
[   34.188463]  fff00000c5a89300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   34.188737]  fff00000c5a89380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.188824] >fff00000c5a89400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   34.188997]                                                                 ^
[   34.189193]  fff00000c5a89480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.189297]  fff00000c5a89500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.189388] ==================================================================

[   26.959086] ==================================================================
[   26.960482] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   26.960749] Read of size 8 at addr ffff888105540b78 by task kunit_try_catch/330
[   26.961466] 
[   26.961694] CPU: 1 UID: 0 PID: 330 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) 
[   26.961781] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.961796] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.961822] Call Trace:
[   26.961838]  <TASK>
[   26.961863]  dump_stack_lvl+0x73/0xb0
[   26.961921]  print_report+0xd1/0x650
[   26.961947]  ? __virt_addr_valid+0x1db/0x2d0
[   26.961973]  ? copy_to_kernel_nofault+0x225/0x260
[   26.961998]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.962026]  ? copy_to_kernel_nofault+0x225/0x260
[   26.962050]  kasan_report+0x141/0x180
[   26.962074]  ? copy_to_kernel_nofault+0x225/0x260
[   26.962103]  __asan_report_load8_noabort+0x18/0x20
[   26.962136]  copy_to_kernel_nofault+0x225/0x260
[   26.962162]  copy_to_kernel_nofault_oob+0x1ed/0x560
[   26.962188]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   26.962212]  ? finish_task_switch.isra.0+0x153/0x700
[   26.962237]  ? __schedule+0x10cc/0x2b60
[   26.962264]  ? trace_hardirqs_on+0x37/0xe0
[   26.962323]  ? __pfx_read_tsc+0x10/0x10
[   26.962347]  ? ktime_get_ts64+0x86/0x230
[   26.962376]  kunit_try_run_case+0x1a5/0x480
[   26.962406]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.962431]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.962464]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.962491]  ? __kthread_parkme+0x82/0x180
[   26.962514]  ? preempt_count_sub+0x50/0x80
[   26.962537]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.962564]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.962589]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.962627]  kthread+0x337/0x6f0
[   26.962649]  ? trace_preempt_on+0x20/0xc0
[   26.962672]  ? __pfx_kthread+0x10/0x10
[   26.962694]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.962719]  ? calculate_sigpending+0x7b/0xa0
[   26.962744]  ? __pfx_kthread+0x10/0x10
[   26.962767]  ret_from_fork+0x116/0x1d0
[   26.962789]  ? __pfx_kthread+0x10/0x10
[   26.962811]  ret_from_fork_asm+0x1a/0x30
[   26.962846]  </TASK>
[   26.962859] 
[   26.978843] Allocated by task 330:
[   26.979481]  kasan_save_stack+0x45/0x70
[   26.980092]  kasan_save_track+0x18/0x40
[   26.980651]  kasan_save_alloc_info+0x3b/0x50
[   26.981175]  __kasan_kmalloc+0xb7/0xc0
[   26.981646]  __kmalloc_cache_noprof+0x189/0x420
[   26.982283]  copy_to_kernel_nofault_oob+0x12f/0x560
[   26.982691]  kunit_try_run_case+0x1a5/0x480
[   26.982845]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.983018]  kthread+0x337/0x6f0
[   26.983136]  ret_from_fork+0x116/0x1d0
[   26.983791]  ret_from_fork_asm+0x1a/0x30
[   26.984429] 
[   26.984709] The buggy address belongs to the object at ffff888105540b00
[   26.984709]  which belongs to the cache kmalloc-128 of size 128
[   26.986163] The buggy address is located 0 bytes to the right of
[   26.986163]  allocated 120-byte region [ffff888105540b00, ffff888105540b78)
[   26.987693] 
[   26.987953] The buggy address belongs to the physical page:
[   26.988489] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105540
[   26.989010] flags: 0x200000000000000(node=0|zone=2)
[   26.989664] page_type: f5(slab)
[   26.989986] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   26.990538] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   26.991466] page dumped because: kasan: bad access detected
[   26.992243] 
[   26.992348] Memory state around the buggy address:
[   26.992571]  ffff888105540a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   26.993391]  ffff888105540a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.993903] >ffff888105540b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   26.994139]                                                                 ^
[   26.995027]  ffff888105540b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.995514]  ffff888105540c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.995733] ==================================================================
[   26.996675] ==================================================================
[   26.997488] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   26.998135] Write of size 8 at addr ffff888105540b78 by task kunit_try_catch/330
[   26.998867] 
[   26.999045] CPU: 1 UID: 0 PID: 330 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) 
[   26.999108] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.999123] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.999146] Call Trace:
[   26.999162]  <TASK>
[   26.999192]  dump_stack_lvl+0x73/0xb0
[   26.999251]  print_report+0xd1/0x650
[   26.999276]  ? __virt_addr_valid+0x1db/0x2d0
[   26.999303]  ? copy_to_kernel_nofault+0x99/0x260
[   26.999327]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.999355]  ? copy_to_kernel_nofault+0x99/0x260
[   26.999379]  kasan_report+0x141/0x180
[   26.999403]  ? copy_to_kernel_nofault+0x99/0x260
[   26.999432]  kasan_check_range+0x10c/0x1c0
[   26.999466]  __kasan_check_write+0x18/0x20
[   26.999491]  copy_to_kernel_nofault+0x99/0x260
[   26.999517]  copy_to_kernel_nofault_oob+0x288/0x560
[   26.999542]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   26.999566]  ? finish_task_switch.isra.0+0x153/0x700
[   26.999590]  ? __schedule+0x10cc/0x2b60
[   26.999616]  ? trace_hardirqs_on+0x37/0xe0
[   26.999648]  ? __pfx_read_tsc+0x10/0x10
[   26.999671]  ? ktime_get_ts64+0x86/0x230
[   26.999697]  kunit_try_run_case+0x1a5/0x480
[   26.999725]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.999749]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.999772]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.999799]  ? __kthread_parkme+0x82/0x180
[   26.999819]  ? preempt_count_sub+0x50/0x80
[   26.999844]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.999870]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.999894]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.999920]  kthread+0x337/0x6f0
[   26.999941]  ? trace_preempt_on+0x20/0xc0
[   26.999964]  ? __pfx_kthread+0x10/0x10
[   26.999986]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.000010]  ? calculate_sigpending+0x7b/0xa0
[   27.000036]  ? __pfx_kthread+0x10/0x10
[   27.000059]  ret_from_fork+0x116/0x1d0
[   27.000080]  ? __pfx_kthread+0x10/0x10
[   27.000103]  ret_from_fork_asm+0x1a/0x30
[   27.000135]  </TASK>
[   27.000150] 
[   27.010039] Allocated by task 330:
[   27.010184]  kasan_save_stack+0x45/0x70
[   27.010959]  kasan_save_track+0x18/0x40
[   27.011673]  kasan_save_alloc_info+0x3b/0x50
[   27.012277]  __kasan_kmalloc+0xb7/0xc0
[   27.012821]  __kmalloc_cache_noprof+0x189/0x420
[   27.012993]  copy_to_kernel_nofault_oob+0x12f/0x560
[   27.013346]  kunit_try_run_case+0x1a5/0x480
[   27.013873]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.014589]  kthread+0x337/0x6f0
[   27.015091]  ret_from_fork+0x116/0x1d0
[   27.015680]  ret_from_fork_asm+0x1a/0x30
[   27.015871] 
[   27.015943] The buggy address belongs to the object at ffff888105540b00
[   27.015943]  which belongs to the cache kmalloc-128 of size 128
[   27.016297] The buggy address is located 0 bytes to the right of
[   27.016297]  allocated 120-byte region [ffff888105540b00, ffff888105540b78)
[   27.017478] 
[   27.017667] The buggy address belongs to the physical page:
[   27.018277] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105540
[   27.019024] flags: 0x200000000000000(node=0|zone=2)
[   27.019517] page_type: f5(slab)
[   27.019887] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   27.020562] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.021302] page dumped because: kasan: bad access detected
[   27.021483] 
[   27.021550] Memory state around the buggy address:
[   27.021701]  ffff888105540a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.021921]  ffff888105540a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.022131] >ffff888105540b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.022680]                                                                 ^
[   27.023399]  ffff888105540b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.024092]  ffff888105540c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.024790] ==================================================================