Hay
Date
July 5, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   23.159812] ==================================================================
[   23.159937] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   23.160062] Write of size 121 at addr fff00000c56e5100 by task kunit_try_catch/286
[   23.160181] 
[   23.160252] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   23.161151] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.161255] Hardware name: linux,dummy-virt (DT)
[   23.161335] Call trace:
[   23.161408]  show_stack+0x20/0x38 (C)
[   23.161529]  dump_stack_lvl+0x8c/0xd0
[   23.161645]  print_report+0x118/0x608
[   23.161752]  kasan_report+0xdc/0x128
[   23.161860]  kasan_check_range+0x100/0x1a8
[   23.161974]  __kasan_check_write+0x20/0x30
[   23.162539]  strncpy_from_user+0x3c/0x2a0
[   23.162766]  copy_user_test_oob+0x5c0/0xec8
[   23.162906]  kunit_try_run_case+0x170/0x3f0
[   23.163016]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.163224]  kthread+0x328/0x630
[   23.163794]  ret_from_fork+0x10/0x20
[   23.164076] 
[   23.164132] Allocated by task 286:
[   23.164196]  kasan_save_stack+0x3c/0x68
[   23.164292]  kasan_save_track+0x20/0x40
[   23.164401]  kasan_save_alloc_info+0x40/0x58
[   23.164501]  __kasan_kmalloc+0xd4/0xd8
[   23.164587]  __kmalloc_noprof+0x198/0x4c8
[   23.164678]  kunit_kmalloc_array+0x34/0x88
[   23.165583]  copy_user_test_oob+0xac/0xec8
[   23.166137]  kunit_try_run_case+0x170/0x3f0
[   23.166286]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.166460]  kthread+0x328/0x630
[   23.166560]  ret_from_fork+0x10/0x20
[   23.166684] 
[   23.166761] The buggy address belongs to the object at fff00000c56e5100
[   23.166761]  which belongs to the cache kmalloc-128 of size 128
[   23.166952] The buggy address is located 0 bytes inside of
[   23.166952]  allocated 120-byte region [fff00000c56e5100, fff00000c56e5178)
[   23.167103] 
[   23.167154] The buggy address belongs to the physical page:
[   23.167224] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056e5
[   23.167334] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.167440] page_type: f5(slab)
[   23.167522] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.167664] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.167753] page dumped because: kasan: bad access detected
[   23.167828] 
[   23.167870] Memory state around the buggy address:
[   23.167951]  fff00000c56e5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.168408]  fff00000c56e5080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.168802] >fff00000c56e5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.169170]                                                                 ^
[   23.169289]  fff00000c56e5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.169771]  fff00000c56e5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.169951] ==================================================================
[   23.171784] ==================================================================
[   23.171916] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   23.172474] Write of size 1 at addr fff00000c56e5178 by task kunit_try_catch/286
[   23.172759] 
[   23.172915] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   23.173455] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.173678] Hardware name: linux,dummy-virt (DT)
[   23.173798] Call trace:
[   23.173882]  show_stack+0x20/0x38 (C)
[   23.174386]  dump_stack_lvl+0x8c/0xd0
[   23.174742]  print_report+0x118/0x608
[   23.175213]  kasan_report+0xdc/0x128
[   23.175528]  __asan_report_store1_noabort+0x20/0x30
[   23.175659]  strncpy_from_user+0x270/0x2a0
[   23.175785]  copy_user_test_oob+0x5c0/0xec8
[   23.175899]  kunit_try_run_case+0x170/0x3f0
[   23.176008]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.176134]  kthread+0x328/0x630
[   23.176238]  ret_from_fork+0x10/0x20
[   23.176631] 
[   23.176987] Allocated by task 286:
[   23.177486]  kasan_save_stack+0x3c/0x68
[   23.177721]  kasan_save_track+0x20/0x40
[   23.177990]  kasan_save_alloc_info+0x40/0x58
[   23.178148]  __kasan_kmalloc+0xd4/0xd8
[   23.178259]  __kmalloc_noprof+0x198/0x4c8
[   23.178562]  kunit_kmalloc_array+0x34/0x88
[   23.178648]  copy_user_test_oob+0xac/0xec8
[   23.178726]  kunit_try_run_case+0x170/0x3f0
[   23.179108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.179621]  kthread+0x328/0x630
[   23.179996]  ret_from_fork+0x10/0x20
[   23.180329] 
[   23.180428] The buggy address belongs to the object at fff00000c56e5100
[   23.180428]  which belongs to the cache kmalloc-128 of size 128
[   23.180571] The buggy address is located 0 bytes to the right of
[   23.180571]  allocated 120-byte region [fff00000c56e5100, fff00000c56e5178)
[   23.180721] 
[   23.181339] The buggy address belongs to the physical page:
[   23.181457] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056e5
[   23.181599] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.181901] page_type: f5(slab)
[   23.182252] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.183031] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.183227] page dumped because: kasan: bad access detected
[   23.183312] 
[   23.183383] Memory state around the buggy address:
[   23.183469]  fff00000c56e5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.183582]  fff00000c56e5080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.183816] >fff00000c56e5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.183950]                                                                 ^
[   23.184457]  fff00000c56e5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.184571]  fff00000c56e5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.184672] ==================================================================

[   18.537483] ==================================================================
[   18.537830] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   18.538249] Write of size 121 at addr ffff888103332c00 by task kunit_try_catch/303
[   18.538642] 
[   18.538807] CPU: 1 UID: 0 PID: 303 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   18.538865] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.538904] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.538933] Call Trace:
[   18.538974]  <TASK>
[   18.539001]  dump_stack_lvl+0x73/0xb0
[   18.539055]  print_report+0xd1/0x650
[   18.539102]  ? __virt_addr_valid+0x1db/0x2d0
[   18.539147]  ? strncpy_from_user+0x2e/0x1d0
[   18.539176]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.539205]  ? strncpy_from_user+0x2e/0x1d0
[   18.539233]  kasan_report+0x141/0x180
[   18.539262]  ? strncpy_from_user+0x2e/0x1d0
[   18.539297]  kasan_check_range+0x10c/0x1c0
[   18.539327]  __kasan_check_write+0x18/0x20
[   18.539352]  strncpy_from_user+0x2e/0x1d0
[   18.539380]  ? __kasan_check_read+0x15/0x20
[   18.539408]  copy_user_test_oob+0x760/0x10f0
[   18.539441]  ? __pfx_copy_user_test_oob+0x10/0x10
[   18.539469]  ? finish_task_switch.isra.0+0x153/0x700
[   18.539498]  ? __switch_to+0x47/0xf50
[   18.539530]  ? __schedule+0x10cc/0x2b60
[   18.539559]  ? __pfx_read_tsc+0x10/0x10
[   18.539585]  ? ktime_get_ts64+0x86/0x230
[   18.539615]  kunit_try_run_case+0x1a5/0x480
[   18.539662]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.539691]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.539720]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.539750]  ? __kthread_parkme+0x82/0x180
[   18.539792]  ? preempt_count_sub+0x50/0x80
[   18.539822]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.539851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.539880]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.539909]  kthread+0x337/0x6f0
[   18.539934]  ? trace_preempt_on+0x20/0xc0
[   18.539965]  ? __pfx_kthread+0x10/0x10
[   18.539991]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.540017]  ? calculate_sigpending+0x7b/0xa0
[   18.540047]  ? __pfx_kthread+0x10/0x10
[   18.540075]  ret_from_fork+0x116/0x1d0
[   18.540098]  ? __pfx_kthread+0x10/0x10
[   18.540123]  ret_from_fork_asm+0x1a/0x30
[   18.540161]  </TASK>
[   18.540176] 
[   18.549742] Allocated by task 303:
[   18.549994]  kasan_save_stack+0x45/0x70
[   18.550299]  kasan_save_track+0x18/0x40
[   18.550573]  kasan_save_alloc_info+0x3b/0x50
[   18.551172]  __kasan_kmalloc+0xb7/0xc0
[   18.551813]  __kmalloc_noprof+0x1c9/0x500
[   18.552701]  kunit_kmalloc_array+0x25/0x60
[   18.553016]  copy_user_test_oob+0xab/0x10f0
[   18.553264]  kunit_try_run_case+0x1a5/0x480
[   18.553493]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.553795]  kthread+0x337/0x6f0
[   18.554447]  ret_from_fork+0x116/0x1d0
[   18.554635]  ret_from_fork_asm+0x1a/0x30
[   18.555163] 
[   18.555283] The buggy address belongs to the object at ffff888103332c00
[   18.555283]  which belongs to the cache kmalloc-128 of size 128
[   18.556221] The buggy address is located 0 bytes inside of
[   18.556221]  allocated 120-byte region [ffff888103332c00, ffff888103332c78)
[   18.556997] 
[   18.557145] The buggy address belongs to the physical page:
[   18.557570] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103332
[   18.558067] flags: 0x200000000000000(node=0|zone=2)
[   18.558344] page_type: f5(slab)
[   18.558580] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.558963] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.559364] page dumped because: kasan: bad access detected
[   18.559697] 
[   18.559813] Memory state around the buggy address:
[   18.560029]  ffff888103332b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.560387]  ffff888103332b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.560756] >ffff888103332c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.561177]                                                                 ^
[   18.561624]  ffff888103332c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.562129]  ffff888103332d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.562507] ==================================================================
[   18.563814] ==================================================================
[   18.564230] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   18.564599] Write of size 1 at addr ffff888103332c78 by task kunit_try_catch/303
[   18.565487] 
[   18.565668] CPU: 1 UID: 0 PID: 303 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   18.565730] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.565747] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.565776] Call Trace:
[   18.565817]  <TASK>
[   18.565868]  dump_stack_lvl+0x73/0xb0
[   18.565907]  print_report+0xd1/0x650
[   18.565936]  ? __virt_addr_valid+0x1db/0x2d0
[   18.565965]  ? strncpy_from_user+0x1a5/0x1d0
[   18.565994]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.566023]  ? strncpy_from_user+0x1a5/0x1d0
[   18.566051]  kasan_report+0x141/0x180
[   18.566100]  ? strncpy_from_user+0x1a5/0x1d0
[   18.566135]  __asan_report_store1_noabort+0x1b/0x30
[   18.566162]  strncpy_from_user+0x1a5/0x1d0
[   18.566194]  copy_user_test_oob+0x760/0x10f0
[   18.566226]  ? __pfx_copy_user_test_oob+0x10/0x10
[   18.566255]  ? finish_task_switch.isra.0+0x153/0x700
[   18.566303]  ? __switch_to+0x47/0xf50
[   18.566336]  ? __schedule+0x10cc/0x2b60
[   18.566365]  ? __pfx_read_tsc+0x10/0x10
[   18.566392]  ? ktime_get_ts64+0x86/0x230
[   18.566426]  kunit_try_run_case+0x1a5/0x480
[   18.566456]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.566484]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.566514]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.566544]  ? __kthread_parkme+0x82/0x180
[   18.566569]  ? preempt_count_sub+0x50/0x80
[   18.566598]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.566628]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.566669]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.566698]  kthread+0x337/0x6f0
[   18.566722]  ? trace_preempt_on+0x20/0xc0
[   18.566751]  ? __pfx_kthread+0x10/0x10
[   18.566788]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.566815]  ? calculate_sigpending+0x7b/0xa0
[   18.566846]  ? __pfx_kthread+0x10/0x10
[   18.566874]  ret_from_fork+0x116/0x1d0
[   18.566898]  ? __pfx_kthread+0x10/0x10
[   18.566923]  ret_from_fork_asm+0x1a/0x30
[   18.566962]  </TASK>
[   18.566976] 
[   18.576242] Allocated by task 303:
[   18.576513]  kasan_save_stack+0x45/0x70
[   18.576813]  kasan_save_track+0x18/0x40
[   18.577036]  kasan_save_alloc_info+0x3b/0x50
[   18.577290]  __kasan_kmalloc+0xb7/0xc0
[   18.577500]  __kmalloc_noprof+0x1c9/0x500
[   18.577809]  kunit_kmalloc_array+0x25/0x60
[   18.578109]  copy_user_test_oob+0xab/0x10f0
[   18.578349]  kunit_try_run_case+0x1a5/0x480
[   18.578846]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.579064]  kthread+0x337/0x6f0
[   18.579206]  ret_from_fork+0x116/0x1d0
[   18.579361]  ret_from_fork_asm+0x1a/0x30
[   18.579522] 
[   18.579607] The buggy address belongs to the object at ffff888103332c00
[   18.579607]  which belongs to the cache kmalloc-128 of size 128
[   18.580278] The buggy address is located 0 bytes to the right of
[   18.580278]  allocated 120-byte region [ffff888103332c00, ffff888103332c78)
[   18.581114] 
[   18.581208] The buggy address belongs to the physical page:
[   18.581410] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103332
[   18.581972] flags: 0x200000000000000(node=0|zone=2)
[   18.582256] page_type: f5(slab)
[   18.582439] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.582759] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.583208] page dumped because: kasan: bad access detected
[   18.583518] 
[   18.583631] Memory state around the buggy address:
[   18.583990]  ffff888103332b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.584241]  ffff888103332b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.584488] >ffff888103332c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.584745]                                                                 ^
[   18.585127]  ffff888103332c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.585533]  ffff888103332d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.586076] ==================================================================