Hay
Date
July 25, 2025, 3:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   35.688926] ==================================================================
[   35.688986] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   35.689493] Write of size 121 at addr fff00000c9a8b900 by task kunit_try_catch/317
[   35.689699] 
[   35.689745] CPU: 0 UID: 0 PID: 317 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   35.690192] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   35.690246] Hardware name: linux,dummy-virt (DT)
[   35.690283] Call trace:
[   35.690309]  show_stack+0x20/0x38 (C)
[   35.690575]  dump_stack_lvl+0x8c/0xd0
[   35.690675]  print_report+0x118/0x5e8
[   35.691004]  kasan_report+0xdc/0x128
[   35.691446]  kasan_check_range+0x100/0x1a8
[   35.691546]  __kasan_check_write+0x20/0x30
[   35.691682]  strncpy_from_user+0x3c/0x2a0
[   35.691787]  copy_user_test_oob+0x5c0/0xec8
[   35.691915]  kunit_try_run_case+0x170/0x3f0
[   35.691967]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   35.692043]  kthread+0x328/0x630
[   35.692089]  ret_from_fork+0x10/0x20
[   35.692752] 
[   35.692959] Allocated by task 317:
[   35.693186]  kasan_save_stack+0x3c/0x68
[   35.693256]  kasan_save_track+0x20/0x40
[   35.693437]  kasan_save_alloc_info+0x40/0x58
[   35.693652]  __kasan_kmalloc+0xd4/0xd8
[   35.693947]  __kmalloc_noprof+0x198/0x4c8
[   35.694060]  kunit_kmalloc_array+0x34/0x88
[   35.694105]  copy_user_test_oob+0xac/0xec8
[   35.694947]  kunit_try_run_case+0x170/0x3f0
[   35.695017]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   35.695064]  kthread+0x328/0x630
[   35.695101]  ret_from_fork+0x10/0x20
[   35.695140] 
[   35.695687] The buggy address belongs to the object at fff00000c9a8b900
[   35.695687]  which belongs to the cache kmalloc-128 of size 128
[   35.695890] The buggy address is located 0 bytes inside of
[   35.695890]  allocated 120-byte region [fff00000c9a8b900, fff00000c9a8b978)
[   35.696191] 
[   35.696454] The buggy address belongs to the physical page:
[   35.696784] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a8b
[   35.697177] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   35.697245] page_type: f5(slab)
[   35.697738] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   35.698162] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   35.698305] page dumped because: kasan: bad access detected
[   35.698393] 
[   35.698598] Memory state around the buggy address:
[   35.698844]  fff00000c9a8b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   35.698915]  fff00000c9a8b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.698966] >fff00000c9a8b900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   35.699594]                                                                 ^
[   35.699775]  fff00000c9a8b980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.699904]  fff00000c9a8ba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.700014] ==================================================================
[   35.701515] ==================================================================
[   35.701572] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   35.702042] Write of size 1 at addr fff00000c9a8b978 by task kunit_try_catch/317
[   35.702173] 
[   35.702218] CPU: 0 UID: 0 PID: 317 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   35.702828] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   35.702932] Hardware name: linux,dummy-virt (DT)
[   35.703028] Call trace:
[   35.703057]  show_stack+0x20/0x38 (C)
[   35.703117]  dump_stack_lvl+0x8c/0xd0
[   35.703167]  print_report+0x118/0x5e8
[   35.703226]  kasan_report+0xdc/0x128
[   35.703719]  __asan_report_store1_noabort+0x20/0x30
[   35.704067]  strncpy_from_user+0x270/0x2a0
[   35.704192]  copy_user_test_oob+0x5c0/0xec8
[   35.704269]  kunit_try_run_case+0x170/0x3f0
[   35.704409]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   35.704898]  kthread+0x328/0x630
[   35.705262]  ret_from_fork+0x10/0x20
[   35.705659] 
[   35.705892] Allocated by task 317:
[   35.706135]  kasan_save_stack+0x3c/0x68
[   35.706249]  kasan_save_track+0x20/0x40
[   35.706298]  kasan_save_alloc_info+0x40/0x58
[   35.706478]  __kasan_kmalloc+0xd4/0xd8
[   35.706724]  __kmalloc_noprof+0x198/0x4c8
[   35.707130]  kunit_kmalloc_array+0x34/0x88
[   35.707535]  copy_user_test_oob+0xac/0xec8
[   35.707624]  kunit_try_run_case+0x170/0x3f0
[   35.707825]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   35.707921]  kthread+0x328/0x630
[   35.708188]  ret_from_fork+0x10/0x20
[   35.708243] 
[   35.708268] The buggy address belongs to the object at fff00000c9a8b900
[   35.708268]  which belongs to the cache kmalloc-128 of size 128
[   35.708360] The buggy address is located 0 bytes to the right of
[   35.708360]  allocated 120-byte region [fff00000c9a8b900, fff00000c9a8b978)
[   35.708434] 
[   35.708463] The buggy address belongs to the physical page:
[   35.708518] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a8b
[   35.708574] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   35.708627] page_type: f5(slab)
[   35.708690] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   35.708753] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   35.708808] page dumped because: kasan: bad access detected
[   35.708841] 
[   35.708863] Memory state around the buggy address:
[   35.708898]  fff00000c9a8b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   35.708952]  fff00000c9a8b880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.708997] >fff00000c9a8b900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   35.709054]                                                                 ^
[   35.709109]  fff00000c9a8b980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.709154]  fff00000c9a8ba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   35.709202] ==================================================================

[   30.196760] ==================================================================
[   30.197191] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   30.197532] Write of size 1 at addr ffff888106253878 by task kunit_try_catch/334
[   30.197869] 
[   30.197982] CPU: 1 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   30.198030] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.198064] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   30.198086] Call Trace:
[   30.198101]  <TASK>
[   30.198115]  dump_stack_lvl+0x73/0xb0
[   30.198144]  print_report+0xd1/0x640
[   30.198168]  ? __virt_addr_valid+0x1db/0x2d0
[   30.198193]  ? strncpy_from_user+0x1a5/0x1d0
[   30.198218]  ? kasan_complete_mode_report_info+0x2a/0x200
[   30.198246]  ? strncpy_from_user+0x1a5/0x1d0
[   30.198271]  kasan_report+0x141/0x180
[   30.198296]  ? strncpy_from_user+0x1a5/0x1d0
[   30.198325]  __asan_report_store1_noabort+0x1b/0x30
[   30.198352]  strncpy_from_user+0x1a5/0x1d0
[   30.198379]  copy_user_test_oob+0x760/0x10f0
[   30.198406]  ? __pfx_copy_user_test_oob+0x10/0x10
[   30.198431]  ? finish_task_switch.isra.0+0x153/0x700
[   30.198454]  ? __switch_to+0x47/0xf80
[   30.198481]  ? __schedule+0x10da/0x2b60
[   30.198504]  ? __pfx_read_tsc+0x10/0x10
[   30.198528]  ? ktime_get_ts64+0x86/0x230
[   30.198553]  kunit_try_run_case+0x1a5/0x480
[   30.198579]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.198603]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   30.198628]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   30.198655]  ? __kthread_parkme+0x82/0x180
[   30.198677]  ? preempt_count_sub+0x50/0x80
[   30.198701]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.198727]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.198754]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   30.198780]  kthread+0x337/0x6f0
[   30.198801]  ? trace_preempt_on+0x20/0xc0
[   30.198825]  ? __pfx_kthread+0x10/0x10
[   30.198848]  ? _raw_spin_unlock_irq+0x47/0x80
[   30.198873]  ? calculate_sigpending+0x7b/0xa0
[   30.198899]  ? __pfx_kthread+0x10/0x10
[   30.198922]  ret_from_fork+0x116/0x1d0
[   30.198952]  ? __pfx_kthread+0x10/0x10
[   30.198975]  ret_from_fork_asm+0x1a/0x30
[   30.199007]  </TASK>
[   30.199019] 
[   30.207524] Allocated by task 334:
[   30.207726]  kasan_save_stack+0x45/0x70
[   30.208015]  kasan_save_track+0x18/0x40
[   30.208223]  kasan_save_alloc_info+0x3b/0x50
[   30.208457]  __kasan_kmalloc+0xb7/0xc0
[   30.208616]  __kmalloc_noprof+0x1ca/0x510
[   30.208837]  kunit_kmalloc_array+0x25/0x60
[   30.209032]  copy_user_test_oob+0xab/0x10f0
[   30.209250]  kunit_try_run_case+0x1a5/0x480
[   30.209453]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.209724]  kthread+0x337/0x6f0
[   30.210016]  ret_from_fork+0x116/0x1d0
[   30.210222]  ret_from_fork_asm+0x1a/0x30
[   30.210398] 
[   30.210471] The buggy address belongs to the object at ffff888106253800
[   30.210471]  which belongs to the cache kmalloc-128 of size 128
[   30.211163] The buggy address is located 0 bytes to the right of
[   30.211163]  allocated 120-byte region [ffff888106253800, ffff888106253878)
[   30.211638] 
[   30.211711] The buggy address belongs to the physical page:
[   30.211911] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106253
[   30.212397] flags: 0x200000000000000(node=0|zone=2)
[   30.212593] page_type: f5(slab)
[   30.212781] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   30.213187] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.213564] page dumped because: kasan: bad access detected
[   30.213847] 
[   30.213969] Memory state around the buggy address:
[   30.214219]  ffff888106253700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.214598]  ffff888106253780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.215135] >ffff888106253800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.215452]                                                                 ^
[   30.215765]  ffff888106253880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.216097]  ffff888106253900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.216411] ==================================================================
[   30.176399] ==================================================================
[   30.176706] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   30.177168] Write of size 121 at addr ffff888106253800 by task kunit_try_catch/334
[   30.177522] 
[   30.177645] CPU: 1 UID: 0 PID: 334 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   30.177707] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.177721] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   30.177757] Call Trace:
[   30.177805]  <TASK>
[   30.177835]  dump_stack_lvl+0x73/0xb0
[   30.177878]  print_report+0xd1/0x640
[   30.177916]  ? __virt_addr_valid+0x1db/0x2d0
[   30.177966]  ? strncpy_from_user+0x2e/0x1d0
[   30.178004]  ? kasan_complete_mode_report_info+0x2a/0x200
[   30.178064]  ? strncpy_from_user+0x2e/0x1d0
[   30.178090]  kasan_report+0x141/0x180
[   30.178114]  ? strncpy_from_user+0x2e/0x1d0
[   30.178143]  kasan_check_range+0x10c/0x1c0
[   30.178169]  __kasan_check_write+0x18/0x20
[   30.178194]  strncpy_from_user+0x2e/0x1d0
[   30.178218]  ? __kasan_check_read+0x15/0x20
[   30.178245]  copy_user_test_oob+0x760/0x10f0
[   30.178272]  ? __pfx_copy_user_test_oob+0x10/0x10
[   30.178297]  ? finish_task_switch.isra.0+0x153/0x700
[   30.178320]  ? __switch_to+0x47/0xf80
[   30.178346]  ? __schedule+0x10da/0x2b60
[   30.178370]  ? __pfx_read_tsc+0x10/0x10
[   30.178393]  ? ktime_get_ts64+0x86/0x230
[   30.178419]  kunit_try_run_case+0x1a5/0x480
[   30.178444]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.178469]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   30.178493]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   30.178521]  ? __kthread_parkme+0x82/0x180
[   30.178544]  ? preempt_count_sub+0x50/0x80
[   30.178568]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.178595]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.178621]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   30.178647]  kthread+0x337/0x6f0
[   30.178668]  ? trace_preempt_on+0x20/0xc0
[   30.178693]  ? __pfx_kthread+0x10/0x10
[   30.178715]  ? _raw_spin_unlock_irq+0x47/0x80
[   30.178741]  ? calculate_sigpending+0x7b/0xa0
[   30.178767]  ? __pfx_kthread+0x10/0x10
[   30.178790]  ret_from_fork+0x116/0x1d0
[   30.178825]  ? __pfx_kthread+0x10/0x10
[   30.178848]  ret_from_fork_asm+0x1a/0x30
[   30.178881]  </TASK>
[   30.178893] 
[   30.187445] Allocated by task 334:
[   30.187804]  kasan_save_stack+0x45/0x70
[   30.188082]  kasan_save_track+0x18/0x40
[   30.188233]  kasan_save_alloc_info+0x3b/0x50
[   30.188384]  __kasan_kmalloc+0xb7/0xc0
[   30.188515]  __kmalloc_noprof+0x1ca/0x510
[   30.188654]  kunit_kmalloc_array+0x25/0x60
[   30.188798]  copy_user_test_oob+0xab/0x10f0
[   30.189076]  kunit_try_run_case+0x1a5/0x480
[   30.189289]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.189729]  kthread+0x337/0x6f0
[   30.189895]  ret_from_fork+0x116/0x1d0
[   30.190168]  ret_from_fork_asm+0x1a/0x30
[   30.190390] 
[   30.190483] The buggy address belongs to the object at ffff888106253800
[   30.190483]  which belongs to the cache kmalloc-128 of size 128
[   30.191148] The buggy address is located 0 bytes inside of
[   30.191148]  allocated 120-byte region [ffff888106253800, ffff888106253878)
[   30.191677] 
[   30.191789] The buggy address belongs to the physical page:
[   30.192104] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106253
[   30.192470] flags: 0x200000000000000(node=0|zone=2)
[   30.192672] page_type: f5(slab)
[   30.192902] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   30.193260] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.193568] page dumped because: kasan: bad access detected
[   30.193861] 
[   30.193933] Memory state around the buggy address:
[   30.194219]  ffff888106253700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.194518]  ffff888106253780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.194854] >ffff888106253800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.195179]                                                                 ^
[   30.195478]  ffff888106253880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.195827]  ffff888106253900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.196182] ==================================================================