Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.730477] ==================================================================
[   33.730544] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   33.730599] Write of size 121 at addr fff00000c9bb7300 by task kunit_try_catch/316
[   33.730653] 
[   33.730685] CPU: 0 UID: 0 PID: 316 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   33.730773] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.730801] Hardware name: linux,dummy-virt (DT)
[   33.730835] Call trace:
[   33.730858]  show_stack+0x20/0x38 (C)
[   33.730917]  dump_stack_lvl+0x8c/0xd0
[   33.730967]  print_report+0x118/0x5d0
[   33.731022]  kasan_report+0xdc/0x128
[   33.731072]  kasan_check_range+0x100/0x1a8
[   33.731123]  __kasan_check_write+0x20/0x30
[   33.731172]  strncpy_from_user+0x3c/0x2a0
[   33.731235]  copy_user_test_oob+0x5c0/0xec8
[   33.731297]  kunit_try_run_case+0x170/0x3f0
[   33.731346]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.731399]  kthread+0x328/0x630
[   33.731444]  ret_from_fork+0x10/0x20
[   33.731492] 
[   33.732575] Allocated by task 316:
[   33.732667]  kasan_save_stack+0x3c/0x68
[   33.732740]  kasan_save_track+0x20/0x40
[   33.732820]  kasan_save_alloc_info+0x40/0x58
[   33.732893]  __kasan_kmalloc+0xd4/0xd8
[   33.732960]  __kmalloc_noprof+0x198/0x4c8
[   33.733031]  kunit_kmalloc_array+0x34/0x88
[   33.733383]  copy_user_test_oob+0xac/0xec8
[   33.733773]  kunit_try_run_case+0x170/0x3f0
[   33.734108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.734213]  kthread+0x328/0x630
[   33.734271]  ret_from_fork+0x10/0x20
[   33.734346] 
[   33.734633] The buggy address belongs to the object at fff00000c9bb7300
[   33.734633]  which belongs to the cache kmalloc-128 of size 128
[   33.734944] The buggy address is located 0 bytes inside of
[   33.734944]  allocated 120-byte region [fff00000c9bb7300, fff00000c9bb7378)
[   33.735345] 
[   33.735385] The buggy address belongs to the physical page:
[   33.735517] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb7
[   33.735864] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.736196] page_type: f5(slab)
[   33.736364] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   33.736691] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   33.736803] page dumped because: kasan: bad access detected
[   33.736880] 
[   33.737179] Memory state around the buggy address:
[   33.737277]  fff00000c9bb7200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.737576]  fff00000c9bb7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.737801] >fff00000c9bb7300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   33.738107]                                                                 ^
[   33.738254]  fff00000c9bb7380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.738439]  fff00000c9bb7400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.738551] ==================================================================
[   33.739615] ==================================================================
[   33.739670] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   33.740114] Write of size 1 at addr fff00000c9bb7378 by task kunit_try_catch/316
[   33.740237] 
[   33.740383] CPU: 0 UID: 0 PID: 316 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   33.740612] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.740644] Hardware name: linux,dummy-virt (DT)
[   33.740991] Call trace:
[   33.741099]  show_stack+0x20/0x38 (C)
[   33.741444]  dump_stack_lvl+0x8c/0xd0
[   33.741533]  print_report+0x118/0x5d0
[   33.741651]  kasan_report+0xdc/0x128
[   33.741866]  __asan_report_store1_noabort+0x20/0x30
[   33.742037]  strncpy_from_user+0x270/0x2a0
[   33.742108]  copy_user_test_oob+0x5c0/0xec8
[   33.742422]  kunit_try_run_case+0x170/0x3f0
[   33.742528]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.742861]  kthread+0x328/0x630
[   33.742996]  ret_from_fork+0x10/0x20
[   33.743205] 
[   33.743325] Allocated by task 316:
[   33.743374]  kasan_save_stack+0x3c/0x68
[   33.743544]  kasan_save_track+0x20/0x40
[   33.743742]  kasan_save_alloc_info+0x40/0x58
[   33.743944]  __kasan_kmalloc+0xd4/0xd8
[   33.743994]  __kmalloc_noprof+0x198/0x4c8
[   33.744037]  kunit_kmalloc_array+0x34/0x88
[   33.744085]  copy_user_test_oob+0xac/0xec8
[   33.744127]  kunit_try_run_case+0x170/0x3f0
[   33.744550]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.744836]  kthread+0x328/0x630
[   33.744886]  ret_from_fork+0x10/0x20
[   33.745161] 
[   33.745233] The buggy address belongs to the object at fff00000c9bb7300
[   33.745233]  which belongs to the cache kmalloc-128 of size 128
[   33.745608] The buggy address is located 0 bytes to the right of
[   33.745608]  allocated 120-byte region [fff00000c9bb7300, fff00000c9bb7378)
[   33.745718] 
[   33.745741] The buggy address belongs to the physical page:
[   33.745776] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb7
[   33.745995] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.746200] page_type: f5(slab)
[   33.746659] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   33.746734] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   33.746944] page dumped because: kasan: bad access detected
[   33.747086] 
[   33.747155] Memory state around the buggy address:
[   33.747204]  fff00000c9bb7200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.747253]  fff00000c9bb7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.747466] >fff00000c9bb7300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   33.747633]                                                                 ^
[   33.747993]  fff00000c9bb7380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.748131]  fff00000c9bb7400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.748246] ==================================================================

[   27.341070] ==================================================================
[   27.341425] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   27.341856] Write of size 121 at addr ffff88810611db00 by task kunit_try_catch/334
[   27.342195] 
[   27.342316] CPU: 0 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   27.342394] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.342409] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.342433] Call Trace:
[   27.342452]  <TASK>
[   27.342481]  dump_stack_lvl+0x73/0xb0
[   27.342511]  print_report+0xd1/0x610
[   27.342533]  ? __virt_addr_valid+0x1db/0x2d0
[   27.342558]  ? strncpy_from_user+0x2e/0x1d0
[   27.342581]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.342608]  ? strncpy_from_user+0x2e/0x1d0
[   27.342643]  kasan_report+0x141/0x180
[   27.342666]  ? strncpy_from_user+0x2e/0x1d0
[   27.342702]  kasan_check_range+0x10c/0x1c0
[   27.342727]  __kasan_check_write+0x18/0x20
[   27.342762]  strncpy_from_user+0x2e/0x1d0
[   27.342785]  ? __kasan_check_read+0x15/0x20
[   27.342811]  copy_user_test_oob+0x760/0x10f0
[   27.342837]  ? __pfx_copy_user_test_oob+0x10/0x10
[   27.342860]  ? finish_task_switch.isra.0+0x153/0x700
[   27.342883]  ? __switch_to+0x47/0xf80
[   27.342909]  ? __schedule+0x10c6/0x2b60
[   27.342933]  ? __pfx_read_tsc+0x10/0x10
[   27.342955]  ? ktime_get_ts64+0x86/0x230
[   27.342980]  kunit_try_run_case+0x1a5/0x480
[   27.343005]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.343037]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.343060]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.343084]  ? __kthread_parkme+0x82/0x180
[   27.343116]  ? preempt_count_sub+0x50/0x80
[   27.343138]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.343163]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.343200]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.343227]  kthread+0x337/0x6f0
[   27.343247]  ? trace_preempt_on+0x20/0xc0
[   27.343282]  ? __pfx_kthread+0x10/0x10
[   27.343303]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.343334]  ? calculate_sigpending+0x7b/0xa0
[   27.343359]  ? __pfx_kthread+0x10/0x10
[   27.343390]  ret_from_fork+0x116/0x1d0
[   27.343410]  ? __pfx_kthread+0x10/0x10
[   27.343431]  ret_from_fork_asm+0x1a/0x30
[   27.343473]  </TASK>
[   27.343484] 
[   27.351281] Allocated by task 334:
[   27.351445]  kasan_save_stack+0x45/0x70
[   27.351663]  kasan_save_track+0x18/0x40
[   27.351836]  kasan_save_alloc_info+0x3b/0x50
[   27.352047]  __kasan_kmalloc+0xb7/0xc0
[   27.352214]  __kmalloc_noprof+0x1c9/0x500
[   27.352417]  kunit_kmalloc_array+0x25/0x60
[   27.352604]  copy_user_test_oob+0xab/0x10f0
[   27.352786]  kunit_try_run_case+0x1a5/0x480
[   27.352927]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.353173]  kthread+0x337/0x6f0
[   27.353360]  ret_from_fork+0x116/0x1d0
[   27.353555]  ret_from_fork_asm+0x1a/0x30
[   27.353791] 
[   27.353856] The buggy address belongs to the object at ffff88810611db00
[   27.353856]  which belongs to the cache kmalloc-128 of size 128
[   27.354350] The buggy address is located 0 bytes inside of
[   27.354350]  allocated 120-byte region [ffff88810611db00, ffff88810611db78)
[   27.354848] 
[   27.354940] The buggy address belongs to the physical page:
[   27.355197] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10611d
[   27.355554] flags: 0x200000000000000(node=0|zone=2)
[   27.355862] page_type: f5(slab)
[   27.356048] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   27.356369] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.356707] page dumped because: kasan: bad access detected
[   27.356994] 
[   27.357059] Memory state around the buggy address:
[   27.357206]  ffff88810611da00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.357582]  ffff88810611da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.357929] >ffff88810611db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.358139]                                                                 ^
[   27.358382]  ffff88810611db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.358889]  ffff88810611dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.359230] ==================================================================
[   27.361049] ==================================================================
[   27.361369] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   27.361952] Write of size 1 at addr ffff88810611db78 by task kunit_try_catch/334
[   27.362185] 
[   27.362286] CPU: 0 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   27.362359] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.362374] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.362396] Call Trace:
[   27.362416]  <TASK>
[   27.362431]  dump_stack_lvl+0x73/0xb0
[   27.362463]  print_report+0xd1/0x610
[   27.362486]  ? __virt_addr_valid+0x1db/0x2d0
[   27.362511]  ? strncpy_from_user+0x1a5/0x1d0
[   27.362535]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.362562]  ? strncpy_from_user+0x1a5/0x1d0
[   27.362587]  kasan_report+0x141/0x180
[   27.362610]  ? strncpy_from_user+0x1a5/0x1d0
[   27.362637]  __asan_report_store1_noabort+0x1b/0x30
[   27.362662]  strncpy_from_user+0x1a5/0x1d0
[   27.362687]  copy_user_test_oob+0x760/0x10f0
[   27.362713]  ? __pfx_copy_user_test_oob+0x10/0x10
[   27.362736]  ? finish_task_switch.isra.0+0x153/0x700
[   27.362759]  ? __switch_to+0x47/0xf80
[   27.362786]  ? __schedule+0x10c6/0x2b60
[   27.362809]  ? __pfx_read_tsc+0x10/0x10
[   27.362833]  ? ktime_get_ts64+0x86/0x230
[   27.362866]  kunit_try_run_case+0x1a5/0x480
[   27.362902]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.362925]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.362960]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.362983]  ? __kthread_parkme+0x82/0x180
[   27.363004]  ? preempt_count_sub+0x50/0x80
[   27.363028]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.363053]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.363079]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.363107]  kthread+0x337/0x6f0
[   27.363128]  ? trace_preempt_on+0x20/0xc0
[   27.363152]  ? __pfx_kthread+0x10/0x10
[   27.363173]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.363195]  ? calculate_sigpending+0x7b/0xa0
[   27.363229]  ? __pfx_kthread+0x10/0x10
[   27.363251]  ret_from_fork+0x116/0x1d0
[   27.363271]  ? __pfx_kthread+0x10/0x10
[   27.363303]  ret_from_fork_asm+0x1a/0x30
[   27.363344]  </TASK>
[   27.363356] 
[   27.370447] Allocated by task 334:
[   27.370678]  kasan_save_stack+0x45/0x70
[   27.370899]  kasan_save_track+0x18/0x40
[   27.371121]  kasan_save_alloc_info+0x3b/0x50
[   27.371348]  __kasan_kmalloc+0xb7/0xc0
[   27.371559]  __kmalloc_noprof+0x1c9/0x500
[   27.371747]  kunit_kmalloc_array+0x25/0x60
[   27.371904]  copy_user_test_oob+0xab/0x10f0
[   27.372123]  kunit_try_run_case+0x1a5/0x480
[   27.372351]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.372532]  kthread+0x337/0x6f0
[   27.372761]  ret_from_fork+0x116/0x1d0
[   27.372968]  ret_from_fork_asm+0x1a/0x30
[   27.373111] 
[   27.373180] The buggy address belongs to the object at ffff88810611db00
[   27.373180]  which belongs to the cache kmalloc-128 of size 128
[   27.373732] The buggy address is located 0 bytes to the right of
[   27.373732]  allocated 120-byte region [ffff88810611db00, ffff88810611db78)
[   27.374248] 
[   27.374346] The buggy address belongs to the physical page:
[   27.374599] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10611d
[   27.374948] flags: 0x200000000000000(node=0|zone=2)
[   27.375120] page_type: f5(slab)
[   27.375237] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   27.375475] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.375796] page dumped because: kasan: bad access detected
[   27.376043] 
[   27.376131] Memory state around the buggy address:
[   27.376358]  ffff88810611da00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.376675]  ffff88810611da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.377058] >ffff88810611db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.377267]                                                                 ^
[   27.377538]  ffff88810611db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.378187]  ffff88810611dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.378510] ==================================================================