Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   22.585931] ==================================================================
[   22.585992] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   22.586138] Write of size 1 at addr fff00000c5713f78 by task kunit_try_catch/285
[   22.586199] 
[   22.586280] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   22.586744] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.586809] Hardware name: linux,dummy-virt (DT)
[   22.586976] Call trace:
[   22.587201]  show_stack+0x20/0x38 (C)
[   22.587416]  dump_stack_lvl+0x8c/0xd0
[   22.587486]  print_report+0x118/0x608
[   22.587854]  kasan_report+0xdc/0x128
[   22.588024]  __asan_report_store1_noabort+0x20/0x30
[   22.588141]  strncpy_from_user+0x270/0x2a0
[   22.588602]  copy_user_test_oob+0x5c0/0xec8
[   22.588681]  kunit_try_run_case+0x170/0x3f0
[   22.588918]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.589052]  kthread+0x328/0x630
[   22.589280]  ret_from_fork+0x10/0x20
[   22.589347] 
[   22.589369] Allocated by task 285:
[   22.589398]  kasan_save_stack+0x3c/0x68
[   22.589792]  kasan_save_track+0x20/0x40
[   22.589861]  kasan_save_alloc_info+0x40/0x58
[   22.589905]  __kasan_kmalloc+0xd4/0xd8
[   22.589942]  __kmalloc_noprof+0x198/0x4c8
[   22.589989]  kunit_kmalloc_array+0x34/0x88
[   22.590037]  copy_user_test_oob+0xac/0xec8
[   22.590078]  kunit_try_run_case+0x170/0x3f0
[   22.590120]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.590168]  kthread+0x328/0x630
[   22.590212]  ret_from_fork+0x10/0x20
[   22.590249] 
[   22.590278] The buggy address belongs to the object at fff00000c5713f00
[   22.590278]  which belongs to the cache kmalloc-128 of size 128
[   22.590348] The buggy address is located 0 bytes to the right of
[   22.590348]  allocated 120-byte region [fff00000c5713f00, fff00000c5713f78)
[   22.590423] 
[   22.590450] The buggy address belongs to the physical page:
[   22.590492] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105713
[   22.590547] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.590596] page_type: f5(slab)
[   22.590655] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.590728] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.590771] page dumped because: kasan: bad access detected
[   22.590806] 
[   22.590825] Memory state around the buggy address:
[   22.590859]  fff00000c5713e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.590904]  fff00000c5713e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.590948] >fff00000c5713f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.590990]                                                                 ^
[   22.591032]  fff00000c5713f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.591076]  fff00000c5714000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.591133] ==================================================================
[   22.575008] ==================================================================
[   22.575061] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   22.575117] Write of size 121 at addr fff00000c5713f00 by task kunit_try_catch/285
[   22.575170] 
[   22.575200] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   22.575685] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.576082] Hardware name: linux,dummy-virt (DT)
[   22.576210] Call trace:
[   22.576278]  show_stack+0x20/0x38 (C)
[   22.576504]  dump_stack_lvl+0x8c/0xd0
[   22.576739]  print_report+0x118/0x608
[   22.576881]  kasan_report+0xdc/0x128
[   22.576998]  kasan_check_range+0x100/0x1a8
[   22.577111]  __kasan_check_write+0x20/0x30
[   22.577160]  strncpy_from_user+0x3c/0x2a0
[   22.577215]  copy_user_test_oob+0x5c0/0xec8
[   22.577264]  kunit_try_run_case+0x170/0x3f0
[   22.577312]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.577668]  kthread+0x328/0x630
[   22.577969]  ret_from_fork+0x10/0x20
[   22.578229] 
[   22.578274] Allocated by task 285:
[   22.578479]  kasan_save_stack+0x3c/0x68
[   22.578810]  kasan_save_track+0x20/0x40
[   22.578889]  kasan_save_alloc_info+0x40/0x58
[   22.579023]  __kasan_kmalloc+0xd4/0xd8
[   22.579143]  __kmalloc_noprof+0x198/0x4c8
[   22.579214]  kunit_kmalloc_array+0x34/0x88
[   22.579253]  copy_user_test_oob+0xac/0xec8
[   22.579576]  kunit_try_run_case+0x170/0x3f0
[   22.579814]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.579890]  kthread+0x328/0x630
[   22.580024]  ret_from_fork+0x10/0x20
[   22.580295] 
[   22.580394] The buggy address belongs to the object at fff00000c5713f00
[   22.580394]  which belongs to the cache kmalloc-128 of size 128
[   22.580496] The buggy address is located 0 bytes inside of
[   22.580496]  allocated 120-byte region [fff00000c5713f00, fff00000c5713f78)
[   22.580851] 
[   22.580951] The buggy address belongs to the physical page:
[   22.581015] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105713
[   22.581234] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.581504] page_type: f5(slab)
[   22.581731] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.581933] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.582304] page dumped because: kasan: bad access detected
[   22.582453] 
[   22.582478] Memory state around the buggy address:
[   22.582517]  fff00000c5713e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.582733]  fff00000c5713e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.582958] >fff00000c5713f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.583129]                                                                 ^
[   22.583275]  fff00000c5713f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.583392]  fff00000c5714000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.583838] ==================================================================

[   17.427442] ==================================================================
[   17.427684] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   17.427912] Write of size 121 at addr ffff888102629100 by task kunit_try_catch/302
[   17.428372] 
[   17.428542] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   17.428584] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.428596] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.428618] Call Trace:
[   17.428634]  <TASK>
[   17.428650]  dump_stack_lvl+0x73/0xb0
[   17.428676]  print_report+0xd1/0x650
[   17.428699]  ? __virt_addr_valid+0x1db/0x2d0
[   17.428722]  ? strncpy_from_user+0x2e/0x1d0
[   17.428745]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.428772]  ? strncpy_from_user+0x2e/0x1d0
[   17.428795]  kasan_report+0x141/0x180
[   17.428817]  ? strncpy_from_user+0x2e/0x1d0
[   17.428845]  kasan_check_range+0x10c/0x1c0
[   17.428869]  __kasan_check_write+0x18/0x20
[   17.428890]  strncpy_from_user+0x2e/0x1d0
[   17.428913]  ? __kasan_check_read+0x15/0x20
[   17.428934]  copy_user_test_oob+0x760/0x10f0
[   17.428961]  ? __pfx_copy_user_test_oob+0x10/0x10
[   17.428983]  ? finish_task_switch.isra.0+0x153/0x700
[   17.429006]  ? __switch_to+0x47/0xf50
[   17.429032]  ? __schedule+0x10cc/0x2b60
[   17.429066]  ? __pfx_read_tsc+0x10/0x10
[   17.429103]  ? ktime_get_ts64+0x86/0x230
[   17.429139]  kunit_try_run_case+0x1a5/0x480
[   17.429167]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.429203]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.429227]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.429251]  ? __kthread_parkme+0x82/0x180
[   17.429272]  ? preempt_count_sub+0x50/0x80
[   17.429296]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.429320]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.429344]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.429368]  kthread+0x337/0x6f0
[   17.429389]  ? trace_preempt_on+0x20/0xc0
[   17.429412]  ? __pfx_kthread+0x10/0x10
[   17.429434]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.429457]  ? calculate_sigpending+0x7b/0xa0
[   17.429480]  ? __pfx_kthread+0x10/0x10
[   17.429502]  ret_from_fork+0x116/0x1d0
[   17.429522]  ? __pfx_kthread+0x10/0x10
[   17.429544]  ret_from_fork_asm+0x1a/0x30
[   17.429584]  </TASK>
[   17.429597] 
[   17.444259] Allocated by task 302:
[   17.444465]  kasan_save_stack+0x45/0x70
[   17.444675]  kasan_save_track+0x18/0x40
[   17.444882]  kasan_save_alloc_info+0x3b/0x50
[   17.445119]  __kasan_kmalloc+0xb7/0xc0
[   17.445286]  __kmalloc_noprof+0x1c9/0x500
[   17.445429]  kunit_kmalloc_array+0x25/0x60
[   17.445576]  copy_user_test_oob+0xab/0x10f0
[   17.445787]  kunit_try_run_case+0x1a5/0x480
[   17.446014]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.446309]  kthread+0x337/0x6f0
[   17.446485]  ret_from_fork+0x116/0x1d0
[   17.446665]  ret_from_fork_asm+0x1a/0x30
[   17.446833] 
[   17.446932] The buggy address belongs to the object at ffff888102629100
[   17.446932]  which belongs to the cache kmalloc-128 of size 128
[   17.447438] The buggy address is located 0 bytes inside of
[   17.447438]  allocated 120-byte region [ffff888102629100, ffff888102629178)
[   17.447987] 
[   17.448099] The buggy address belongs to the physical page:
[   17.448339] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102629
[   17.448710] flags: 0x200000000000000(node=0|zone=2)
[   17.448947] page_type: f5(slab)
[   17.449135] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.449465] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.449814] page dumped because: kasan: bad access detected
[   17.450062] 
[   17.450164] Memory state around the buggy address:
[   17.450358]  ffff888102629000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.450596]  ffff888102629080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.450858] >ffff888102629100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.451204]                                                                 ^
[   17.451545]  ffff888102629180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.451855]  ffff888102629200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.452077] ==================================================================
[   17.452720] ==================================================================
[   17.453108] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   17.453450] Write of size 1 at addr ffff888102629178 by task kunit_try_catch/302
[   17.453792] 
[   17.453880] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   17.453923] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.453937] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.453960] Call Trace:
[   17.453977]  <TASK>
[   17.453994]  dump_stack_lvl+0x73/0xb0
[   17.454021]  print_report+0xd1/0x650
[   17.454062]  ? __virt_addr_valid+0x1db/0x2d0
[   17.454084]  ? strncpy_from_user+0x1a5/0x1d0
[   17.454119]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.454146]  ? strncpy_from_user+0x1a5/0x1d0
[   17.454170]  kasan_report+0x141/0x180
[   17.454192]  ? strncpy_from_user+0x1a5/0x1d0
[   17.454220]  __asan_report_store1_noabort+0x1b/0x30
[   17.454245]  strncpy_from_user+0x1a5/0x1d0
[   17.454271]  copy_user_test_oob+0x760/0x10f0
[   17.454297]  ? __pfx_copy_user_test_oob+0x10/0x10
[   17.454320]  ? finish_task_switch.isra.0+0x153/0x700
[   17.454343]  ? __switch_to+0x47/0xf50
[   17.454368]  ? __schedule+0x10cc/0x2b60
[   17.454391]  ? __pfx_read_tsc+0x10/0x10
[   17.454412]  ? ktime_get_ts64+0x86/0x230
[   17.454436]  kunit_try_run_case+0x1a5/0x480
[   17.454462]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.454505]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.454528]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.454553]  ? __kthread_parkme+0x82/0x180
[   17.454573]  ? preempt_count_sub+0x50/0x80
[   17.454596]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.454621]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.454644]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.454668]  kthread+0x337/0x6f0
[   17.454688]  ? trace_preempt_on+0x20/0xc0
[   17.454711]  ? __pfx_kthread+0x10/0x10
[   17.454735]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.454757]  ? calculate_sigpending+0x7b/0xa0
[   17.454782]  ? __pfx_kthread+0x10/0x10
[   17.454805]  ret_from_fork+0x116/0x1d0
[   17.454845]  ? __pfx_kthread+0x10/0x10
[   17.454866]  ret_from_fork_asm+0x1a/0x30
[   17.454909]  </TASK>
[   17.454922] 
[   17.462362] Allocated by task 302:
[   17.462580]  kasan_save_stack+0x45/0x70
[   17.462778]  kasan_save_track+0x18/0x40
[   17.462968]  kasan_save_alloc_info+0x3b/0x50
[   17.463192]  __kasan_kmalloc+0xb7/0xc0
[   17.463357]  __kmalloc_noprof+0x1c9/0x500
[   17.463514]  kunit_kmalloc_array+0x25/0x60
[   17.463663]  copy_user_test_oob+0xab/0x10f0
[   17.463871]  kunit_try_run_case+0x1a5/0x480
[   17.464109]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.464373]  kthread+0x337/0x6f0
[   17.464567]  ret_from_fork+0x116/0x1d0
[   17.464784]  ret_from_fork_asm+0x1a/0x30
[   17.464973] 
[   17.465084] The buggy address belongs to the object at ffff888102629100
[   17.465084]  which belongs to the cache kmalloc-128 of size 128
[   17.465622] The buggy address is located 0 bytes to the right of
[   17.465622]  allocated 120-byte region [ffff888102629100, ffff888102629178)
[   17.466148] 
[   17.466248] The buggy address belongs to the physical page:
[   17.466523] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102629
[   17.466851] flags: 0x200000000000000(node=0|zone=2)
[   17.467015] page_type: f5(slab)
[   17.467146] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.467379] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.467736] page dumped because: kasan: bad access detected
[   17.467994] 
[   17.468098] Memory state around the buggy address:
[   17.468325]  ffff888102629000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.468656]  ffff888102629080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.468986] >ffff888102629100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.469325]                                                                 ^
[   17.469572]  ffff888102629180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.469793]  ffff888102629200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.470086] ==================================================================