Hay
Date
July 4, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.763566] ==================================================================
[   32.763702] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   32.763771] Write of size 121 at addr fff00000c5adb400 by task kunit_try_catch/318
[   32.763870] 
[   32.764001] CPU: 1 UID: 0 PID: 318 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT 
[   32.764132] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.764173] Hardware name: linux,dummy-virt (DT)
[   32.764540] Call trace:
[   32.764775]  show_stack+0x20/0x38 (C)
[   32.764840]  dump_stack_lvl+0x8c/0xd0
[   32.764892]  print_report+0x118/0x608
[   32.764965]  kasan_report+0xdc/0x128
[   32.765092]  kasan_check_range+0x100/0x1a8
[   32.765158]  __kasan_check_write+0x20/0x30
[   32.765381]  strncpy_from_user+0x3c/0x2a0
[   32.765624]  copy_user_test_oob+0x5c0/0xec8
[   32.765818]  kunit_try_run_case+0x170/0x3f0
[   32.765869]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.765937]  kthread+0x328/0x630
[   32.766097]  ret_from_fork+0x10/0x20
[   32.766438] 
[   32.766465] Allocated by task 318:
[   32.766500]  kasan_save_stack+0x3c/0x68
[   32.766763]  kasan_save_track+0x20/0x40
[   32.766914]  kasan_save_alloc_info+0x40/0x58
[   32.766990]  __kasan_kmalloc+0xd4/0xd8
[   32.767035]  __kmalloc_noprof+0x198/0x4c8
[   32.767357]  kunit_kmalloc_array+0x34/0x88
[   32.767502]  copy_user_test_oob+0xac/0xec8
[   32.767619]  kunit_try_run_case+0x170/0x3f0
[   32.767686]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.767836]  kthread+0x328/0x630
[   32.767873]  ret_from_fork+0x10/0x20
[   32.767953] 
[   32.768040] The buggy address belongs to the object at fff00000c5adb400
[   32.768040]  which belongs to the cache kmalloc-128 of size 128
[   32.768135] The buggy address is located 0 bytes inside of
[   32.768135]  allocated 120-byte region [fff00000c5adb400, fff00000c5adb478)
[   32.768202] 
[   32.768226] The buggy address belongs to the physical page:
[   32.768261] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105adb
[   32.768329] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.768383] page_type: f5(slab)
[   32.768777] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   32.768842] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   32.769231] page dumped because: kasan: bad access detected
[   32.769277] 
[   32.769298] Memory state around the buggy address:
[   32.769386]  fff00000c5adb300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.769738]  fff00000c5adb380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.769796] >fff00000c5adb400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   32.769907]                                                                 ^
[   32.770165]  fff00000c5adb480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.770219]  fff00000c5adb500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.770399] ==================================================================
[   32.771435] ==================================================================
[   32.771675] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   32.771860] Write of size 1 at addr fff00000c5adb478 by task kunit_try_catch/318
[   32.771925] 
[   32.771956] CPU: 1 UID: 0 PID: 318 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT 
[   32.772053] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.772185] Hardware name: linux,dummy-virt (DT)
[   32.772353] Call trace:
[   32.772380]  show_stack+0x20/0x38 (C)
[   32.772430]  dump_stack_lvl+0x8c/0xd0
[   32.772478]  print_report+0x118/0x608
[   32.772527]  kasan_report+0xdc/0x128
[   32.772582]  __asan_report_store1_noabort+0x20/0x30
[   32.772735]  strncpy_from_user+0x270/0x2a0
[   32.772831]  copy_user_test_oob+0x5c0/0xec8
[   32.773275]  kunit_try_run_case+0x170/0x3f0
[   32.773351]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.773863]  kthread+0x328/0x630
[   32.773943]  ret_from_fork+0x10/0x20
[   32.774046] 
[   32.774088] Allocated by task 318:
[   32.774248]  kasan_save_stack+0x3c/0x68
[   32.774335]  kasan_save_track+0x20/0x40
[   32.774396]  kasan_save_alloc_info+0x40/0x58
[   32.774439]  __kasan_kmalloc+0xd4/0xd8
[   32.774480]  __kmalloc_noprof+0x198/0x4c8
[   32.774522]  kunit_kmalloc_array+0x34/0x88
[   32.774564]  copy_user_test_oob+0xac/0xec8
[   32.774606]  kunit_try_run_case+0x170/0x3f0
[   32.774648]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.774695]  kthread+0x328/0x630
[   32.774732]  ret_from_fork+0x10/0x20
[   32.774772] 
[   32.774794] The buggy address belongs to the object at fff00000c5adb400
[   32.774794]  which belongs to the cache kmalloc-128 of size 128
[   32.775473] The buggy address is located 0 bytes to the right of
[   32.775473]  allocated 120-byte region [fff00000c5adb400, fff00000c5adb478)
[   32.775858] 
[   32.775883] The buggy address belongs to the physical page:
[   32.776097] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105adb
[   32.776180] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.776344] page_type: f5(slab)
[   32.776448] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   32.776539] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   32.776581] page dumped because: kasan: bad access detected
[   32.776668] 
[   32.776713] Memory state around the buggy address:
[   32.776746]  fff00000c5adb300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   32.776801]  fff00000c5adb380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.776909] >fff00000c5adb400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   32.776951]                                                                 ^
[   32.777515]  fff00000c5adb480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.777781]  fff00000c5adb500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.777837] ==================================================================

[   29.580076] ==================================================================
[   29.580469] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   29.580823] Write of size 1 at addr ffff888106258978 by task kunit_try_catch/334
[   29.581178] 
[   29.581327] CPU: 1 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) 
[   29.581382] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.581408] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   29.581434] Call Trace:
[   29.581456]  <TASK>
[   29.581477]  dump_stack_lvl+0x73/0xb0
[   29.581507]  print_report+0xd1/0x650
[   29.581531]  ? __virt_addr_valid+0x1db/0x2d0
[   29.581557]  ? strncpy_from_user+0x1a5/0x1d0
[   29.581581]  ? kasan_complete_mode_report_info+0x2a/0x200
[   29.581609]  ? strncpy_from_user+0x1a5/0x1d0
[   29.581632]  kasan_report+0x141/0x180
[   29.581655]  ? strncpy_from_user+0x1a5/0x1d0
[   29.581683]  __asan_report_store1_noabort+0x1b/0x30
[   29.581710]  strncpy_from_user+0x1a5/0x1d0
[   29.581734]  copy_user_test_oob+0x760/0x10f0
[   29.581761]  ? __pfx_copy_user_test_oob+0x10/0x10
[   29.581784]  ? finish_task_switch.isra.0+0x153/0x700
[   29.581808]  ? __switch_to+0x47/0xf50
[   29.581836]  ? __schedule+0x10cc/0x2b60
[   29.581869]  ? __pfx_read_tsc+0x10/0x10
[   29.581893]  ? ktime_get_ts64+0x86/0x230
[   29.581919]  kunit_try_run_case+0x1a5/0x480
[   29.581947]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.581973]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   29.581998]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   29.582026]  ? __kthread_parkme+0x82/0x180
[   29.582048]  ? preempt_count_sub+0x50/0x80
[   29.582073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.582100]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.582127]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   29.582154]  kthread+0x337/0x6f0
[   29.582176]  ? trace_preempt_on+0x20/0xc0
[   29.582226]  ? __pfx_kthread+0x10/0x10
[   29.582250]  ? _raw_spin_unlock_irq+0x47/0x80
[   29.582277]  ? calculate_sigpending+0x7b/0xa0
[   29.582304]  ? __pfx_kthread+0x10/0x10
[   29.582327]  ret_from_fork+0x116/0x1d0
[   29.582349]  ? __pfx_kthread+0x10/0x10
[   29.582371]  ret_from_fork_asm+0x1a/0x30
[   29.582414]  </TASK>
[   29.582428] 
[   29.589401] Allocated by task 334:
[   29.589586]  kasan_save_stack+0x45/0x70
[   29.589786]  kasan_save_track+0x18/0x40
[   29.590022]  kasan_save_alloc_info+0x3b/0x50
[   29.590170]  __kasan_kmalloc+0xb7/0xc0
[   29.590366]  __kmalloc_noprof+0x1c9/0x500
[   29.590579]  kunit_kmalloc_array+0x25/0x60
[   29.590726]  copy_user_test_oob+0xab/0x10f0
[   29.590864]  kunit_try_run_case+0x1a5/0x480
[   29.591061]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.591321]  kthread+0x337/0x6f0
[   29.591481]  ret_from_fork+0x116/0x1d0
[   29.591608]  ret_from_fork_asm+0x1a/0x30
[   29.591740] 
[   29.591831] The buggy address belongs to the object at ffff888106258900
[   29.591831]  which belongs to the cache kmalloc-128 of size 128
[   29.592521] The buggy address is located 0 bytes to the right of
[   29.592521]  allocated 120-byte region [ffff888106258900, ffff888106258978)
[   29.592871] 
[   29.592938] The buggy address belongs to the physical page:
[   29.593103] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106258
[   29.593814] flags: 0x200000000000000(node=0|zone=2)
[   29.594292] page_type: f5(slab)
[   29.594475] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   29.594820] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.595044] page dumped because: kasan: bad access detected
[   29.595309] 
[   29.595435] Memory state around the buggy address:
[   29.595656]  ffff888106258800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.596006]  ffff888106258880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.596288] >ffff888106258900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.596591]                                                                 ^
[   29.596796]  ffff888106258980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.597002]  ffff888106258a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.597205] ==================================================================
[   29.560349] ==================================================================
[   29.560897] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   29.561267] Write of size 121 at addr ffff888106258900 by task kunit_try_catch/334
[   29.561641] 
[   29.561759] CPU: 1 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) 
[   29.561847] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.561862] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   29.561889] Call Trace:
[   29.561912]  <TASK>
[   29.561933]  dump_stack_lvl+0x73/0xb0
[   29.561995]  print_report+0xd1/0x650
[   29.562021]  ? __virt_addr_valid+0x1db/0x2d0
[   29.562048]  ? strncpy_from_user+0x2e/0x1d0
[   29.562071]  ? kasan_complete_mode_report_info+0x2a/0x200
[   29.562129]  ? strncpy_from_user+0x2e/0x1d0
[   29.562154]  kasan_report+0x141/0x180
[   29.562177]  ? strncpy_from_user+0x2e/0x1d0
[   29.562204]  kasan_check_range+0x10c/0x1c0
[   29.562230]  __kasan_check_write+0x18/0x20
[   29.562254]  strncpy_from_user+0x2e/0x1d0
[   29.562277]  ? __kasan_check_read+0x15/0x20
[   29.562303]  copy_user_test_oob+0x760/0x10f0
[   29.562329]  ? __pfx_copy_user_test_oob+0x10/0x10
[   29.562355]  ? finish_task_switch.isra.0+0x153/0x700
[   29.562378]  ? __switch_to+0x47/0xf50
[   29.562417]  ? __schedule+0x10cc/0x2b60
[   29.562444]  ? __pfx_read_tsc+0x10/0x10
[   29.562467]  ? ktime_get_ts64+0x86/0x230
[   29.562494]  kunit_try_run_case+0x1a5/0x480
[   29.562521]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.562547]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   29.562572]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   29.562598]  ? __kthread_parkme+0x82/0x180
[   29.562621]  ? preempt_count_sub+0x50/0x80
[   29.562646]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.562672]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.562698]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   29.562724]  kthread+0x337/0x6f0
[   29.562746]  ? trace_preempt_on+0x20/0xc0
[   29.562771]  ? __pfx_kthread+0x10/0x10
[   29.562794]  ? _raw_spin_unlock_irq+0x47/0x80
[   29.562818]  ? calculate_sigpending+0x7b/0xa0
[   29.562844]  ? __pfx_kthread+0x10/0x10
[   29.562868]  ret_from_fork+0x116/0x1d0
[   29.562900]  ? __pfx_kthread+0x10/0x10
[   29.562923]  ret_from_fork_asm+0x1a/0x30
[   29.562991]  </TASK>
[   29.563006] 
[   29.570762] Allocated by task 334:
[   29.570933]  kasan_save_stack+0x45/0x70
[   29.571161]  kasan_save_track+0x18/0x40
[   29.571332]  kasan_save_alloc_info+0x3b/0x50
[   29.571571]  __kasan_kmalloc+0xb7/0xc0
[   29.571785]  __kmalloc_noprof+0x1c9/0x500
[   29.572060]  kunit_kmalloc_array+0x25/0x60
[   29.572269]  copy_user_test_oob+0xab/0x10f0
[   29.572505]  kunit_try_run_case+0x1a5/0x480
[   29.572716]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.573008]  kthread+0x337/0x6f0
[   29.573208]  ret_from_fork+0x116/0x1d0
[   29.573419]  ret_from_fork_asm+0x1a/0x30
[   29.573616] 
[   29.573712] The buggy address belongs to the object at ffff888106258900
[   29.573712]  which belongs to the cache kmalloc-128 of size 128
[   29.574242] The buggy address is located 0 bytes inside of
[   29.574242]  allocated 120-byte region [ffff888106258900, ffff888106258978)
[   29.574707] 
[   29.574780] The buggy address belongs to the physical page:
[   29.575139] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106258
[   29.575518] flags: 0x200000000000000(node=0|zone=2)
[   29.575761] page_type: f5(slab)
[   29.575880] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   29.576138] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.576602] page dumped because: kasan: bad access detected
[   29.576963] 
[   29.577059] Memory state around the buggy address:
[   29.577310]  ffff888106258800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.577673]  ffff888106258880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.577912] >ffff888106258900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.578260]                                                                 ^
[   29.578631]  ffff888106258980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.578972]  ffff888106258a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.579304] ==================================================================