Hay
Date
June 16, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   23.046942] ==================================================================
[   23.047021] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   23.047100] Write of size 121 at addr fff00000c6587700 by task kunit_try_catch/294
[   23.047166] 
[   23.047210] CPU: 0 UID: 0 PID: 294 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   23.047318] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.047358] Hardware name: linux,dummy-virt (DT)
[   23.047398] Call trace:
[   23.047429]  show_stack+0x20/0x38 (C)
[   23.047493]  dump_stack_lvl+0x8c/0xd0
[   23.047550]  print_report+0x118/0x608
[   23.047605]  kasan_report+0xdc/0x128
[   23.047657]  kasan_check_range+0x100/0x1a8
[   23.047709]  __kasan_check_write+0x20/0x30
[   23.047761]  strncpy_from_user+0x3c/0x2a0
[   23.047814]  copy_user_test_oob+0x5c0/0xec8
[   23.048502]  kunit_try_run_case+0x170/0x3f0
[   23.048645]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.048999]  kthread+0x328/0x630
[   23.049060]  ret_from_fork+0x10/0x20
[   23.049273] 
[   23.049303] Allocated by task 294:
[   23.049339]  kasan_save_stack+0x3c/0x68
[   23.049542]  kasan_save_track+0x20/0x40
[   23.049604]  kasan_save_alloc_info+0x40/0x58
[   23.049869]  __kasan_kmalloc+0xd4/0xd8
[   23.049924]  __kmalloc_noprof+0x198/0x4c8
[   23.050297]  kunit_kmalloc_array+0x34/0x88
[   23.050479]  copy_user_test_oob+0xac/0xec8
[   23.050758]  kunit_try_run_case+0x170/0x3f0
[   23.050910]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.050975]  kthread+0x328/0x630
[   23.051018]  ret_from_fork+0x10/0x20
[   23.051075] 
[   23.051101] The buggy address belongs to the object at fff00000c6587700
[   23.051101]  which belongs to the cache kmalloc-128 of size 128
[   23.051171] The buggy address is located 0 bytes inside of
[   23.051171]  allocated 120-byte region [fff00000c6587700, fff00000c6587778)
[   23.051241] 
[   23.051269] The buggy address belongs to the physical page:
[   23.051308] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106587
[   23.051369] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.051427] page_type: f5(slab)
[   23.051738] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.051829] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.051968] page dumped because: kasan: bad access detected
[   23.052109] 
[   23.052149] Memory state around the buggy address:
[   23.052216]  fff00000c6587600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.052380]  fff00000c6587680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.052459] >fff00000c6587700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.052663]                                                                 ^
[   23.052859]  fff00000c6587780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.053017]  fff00000c6587800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.053066] ==================================================================
[   23.054527] ==================================================================
[   23.054993] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   23.055075] Write of size 1 at addr fff00000c6587778 by task kunit_try_catch/294
[   23.055275] 
[   23.055364] CPU: 0 UID: 0 PID: 294 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   23.055602] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.055812] Hardware name: linux,dummy-virt (DT)
[   23.055999] Call trace:
[   23.056038]  show_stack+0x20/0x38 (C)
[   23.056103]  dump_stack_lvl+0x8c/0xd0
[   23.056156]  print_report+0x118/0x608
[   23.056211]  kasan_report+0xdc/0x128
[   23.056262]  __asan_report_store1_noabort+0x20/0x30
[   23.056317]  strncpy_from_user+0x270/0x2a0
[   23.056370]  copy_user_test_oob+0x5c0/0xec8
[   23.056424]  kunit_try_run_case+0x170/0x3f0
[   23.056478]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.056535]  kthread+0x328/0x630
[   23.056584]  ret_from_fork+0x10/0x20
[   23.056637] 
[   23.056663] Allocated by task 294:
[   23.056701]  kasan_save_stack+0x3c/0x68
[   23.056751]  kasan_save_track+0x20/0x40
[   23.056795]  kasan_save_alloc_info+0x40/0x58
[   23.056891]  __kasan_kmalloc+0xd4/0xd8
[   23.056940]  __kmalloc_noprof+0x198/0x4c8
[   23.057000]  kunit_kmalloc_array+0x34/0x88
[   23.057085]  copy_user_test_oob+0xac/0xec8
[   23.057130]  kunit_try_run_case+0x170/0x3f0
[   23.057189]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.057244]  kthread+0x328/0x630
[   23.057281]  ret_from_fork+0x10/0x20
[   23.057324] 
[   23.057349] The buggy address belongs to the object at fff00000c6587700
[   23.057349]  which belongs to the cache kmalloc-128 of size 128
[   23.057416] The buggy address is located 0 bytes to the right of
[   23.057416]  allocated 120-byte region [fff00000c6587700, fff00000c6587778)
[   23.057484] 
[   23.057511] The buggy address belongs to the physical page:
[   23.057551] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106587
[   23.057615] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.057705] page_type: f5(slab)
[   23.057784] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.057898] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.057955] page dumped because: kasan: bad access detected
[   23.057999] 
[   23.058027] Memory state around the buggy address:
[   23.058066]  fff00000c6587600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.058120]  fff00000c6587680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.058170] >fff00000c6587700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.058216]                                                                 ^
[   23.058264]  fff00000c6587780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.058371]  fff00000c6587800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.058431] ==================================================================

[   15.604576] ==================================================================
[   15.604809] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   15.605295] Write of size 121 at addr ffff8881028df100 by task kunit_try_catch/311
[   15.605960] 
[   15.606136] CPU: 1 UID: 0 PID: 311 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   15.606182] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.606195] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.606216] Call Trace:
[   15.606236]  <TASK>
[   15.606254]  dump_stack_lvl+0x73/0xb0
[   15.606282]  print_report+0xd1/0x650
[   15.606306]  ? __virt_addr_valid+0x1db/0x2d0
[   15.606330]  ? strncpy_from_user+0x2e/0x1d0
[   15.606363]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.606406]  ? strncpy_from_user+0x2e/0x1d0
[   15.606441]  kasan_report+0x141/0x180
[   15.606464]  ? strncpy_from_user+0x2e/0x1d0
[   15.606492]  kasan_check_range+0x10c/0x1c0
[   15.606516]  __kasan_check_write+0x18/0x20
[   15.606536]  strncpy_from_user+0x2e/0x1d0
[   15.606559]  ? __kasan_check_read+0x15/0x20
[   15.606580]  copy_user_test_oob+0x760/0x10f0
[   15.606605]  ? __pfx_copy_user_test_oob+0x10/0x10
[   15.606628]  ? finish_task_switch.isra.0+0x153/0x700
[   15.606650]  ? __switch_to+0x47/0xf50
[   15.606676]  ? __schedule+0x10cc/0x2b60
[   15.606699]  ? __pfx_read_tsc+0x10/0x10
[   15.606720]  ? ktime_get_ts64+0x86/0x230
[   15.606746]  kunit_try_run_case+0x1a5/0x480
[   15.606770]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.606792]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.606814]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.606837]  ? __kthread_parkme+0x82/0x180
[   15.606858]  ? preempt_count_sub+0x50/0x80
[   15.606880]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.606904]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.606938]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.606962]  kthread+0x337/0x6f0
[   15.606981]  ? trace_preempt_on+0x20/0xc0
[   15.607006]  ? __pfx_kthread+0x10/0x10
[   15.607027]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.607048]  ? calculate_sigpending+0x7b/0xa0
[   15.607072]  ? __pfx_kthread+0x10/0x10
[   15.607094]  ret_from_fork+0x116/0x1d0
[   15.607113]  ? __pfx_kthread+0x10/0x10
[   15.607133]  ret_from_fork_asm+0x1a/0x30
[   15.607165]  </TASK>
[   15.607175] 
[   15.615023] Allocated by task 311:
[   15.615147]  kasan_save_stack+0x45/0x70
[   15.615282]  kasan_save_track+0x18/0x40
[   15.615429]  kasan_save_alloc_info+0x3b/0x50
[   15.615664]  __kasan_kmalloc+0xb7/0xc0
[   15.615845]  __kmalloc_noprof+0x1c9/0x500
[   15.616056]  kunit_kmalloc_array+0x25/0x60
[   15.616271]  copy_user_test_oob+0xab/0x10f0
[   15.616577]  kunit_try_run_case+0x1a5/0x480
[   15.616811]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.616996]  kthread+0x337/0x6f0
[   15.617111]  ret_from_fork+0x116/0x1d0
[   15.617236]  ret_from_fork_asm+0x1a/0x30
[   15.617368] 
[   15.617553] The buggy address belongs to the object at ffff8881028df100
[   15.617553]  which belongs to the cache kmalloc-128 of size 128
[   15.618149] The buggy address is located 0 bytes inside of
[   15.618149]  allocated 120-byte region [ffff8881028df100, ffff8881028df178)
[   15.618691] 
[   15.618778] The buggy address belongs to the physical page:
[   15.618996] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028df
[   15.619339] flags: 0x200000000000000(node=0|zone=2)
[   15.619607] page_type: f5(slab)
[   15.619761] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   15.620114] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.620463] page dumped because: kasan: bad access detected
[   15.620699] 
[   15.620790] Memory state around the buggy address:
[   15.621023]  ffff8881028df000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.621306]  ffff8881028df080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.621645] >ffff8881028df100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.621857]                                                                 ^
[   15.622075]  ffff8881028df180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.622283]  ffff8881028df200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.622539] ==================================================================
[   15.623095] ==================================================================
[   15.623599] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   15.623941] Write of size 1 at addr ffff8881028df178 by task kunit_try_catch/311
[   15.624307] 
[   15.624441] CPU: 1 UID: 0 PID: 311 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   15.624487] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.624500] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.624521] Call Trace:
[   15.624535]  <TASK>
[   15.624550]  dump_stack_lvl+0x73/0xb0
[   15.624577]  print_report+0xd1/0x650
[   15.624599]  ? __virt_addr_valid+0x1db/0x2d0
[   15.624621]  ? strncpy_from_user+0x1a5/0x1d0
[   15.624644]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.624668]  ? strncpy_from_user+0x1a5/0x1d0
[   15.624692]  kasan_report+0x141/0x180
[   15.624715]  ? strncpy_from_user+0x1a5/0x1d0
[   15.624742]  __asan_report_store1_noabort+0x1b/0x30
[   15.624768]  strncpy_from_user+0x1a5/0x1d0
[   15.624793]  copy_user_test_oob+0x760/0x10f0
[   15.624818]  ? __pfx_copy_user_test_oob+0x10/0x10
[   15.624841]  ? finish_task_switch.isra.0+0x153/0x700
[   15.624862]  ? __switch_to+0x47/0xf50
[   15.624887]  ? __schedule+0x10cc/0x2b60
[   15.624909]  ? __pfx_read_tsc+0x10/0x10
[   15.624940]  ? ktime_get_ts64+0x86/0x230
[   15.624967]  kunit_try_run_case+0x1a5/0x480
[   15.624990]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.625013]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.625035]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.625067]  ? __kthread_parkme+0x82/0x180
[   15.625088]  ? preempt_count_sub+0x50/0x80
[   15.625110]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.625145]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.625178]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.625201]  kthread+0x337/0x6f0
[   15.625221]  ? trace_preempt_on+0x20/0xc0
[   15.625257]  ? __pfx_kthread+0x10/0x10
[   15.625278]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.625298]  ? calculate_sigpending+0x7b/0xa0
[   15.625323]  ? __pfx_kthread+0x10/0x10
[   15.625345]  ret_from_fork+0x116/0x1d0
[   15.625363]  ? __pfx_kthread+0x10/0x10
[   15.625384]  ret_from_fork_asm+0x1a/0x30
[   15.625414]  </TASK>
[   15.625425] 
[   15.632830] Allocated by task 311:
[   15.633032]  kasan_save_stack+0x45/0x70
[   15.633224]  kasan_save_track+0x18/0x40
[   15.633354]  kasan_save_alloc_info+0x3b/0x50
[   15.633572]  __kasan_kmalloc+0xb7/0xc0
[   15.633802]  __kmalloc_noprof+0x1c9/0x500
[   15.634010]  kunit_kmalloc_array+0x25/0x60
[   15.634185]  copy_user_test_oob+0xab/0x10f0
[   15.634388]  kunit_try_run_case+0x1a5/0x480
[   15.634587]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.634823]  kthread+0x337/0x6f0
[   15.635000]  ret_from_fork+0x116/0x1d0
[   15.635177]  ret_from_fork_asm+0x1a/0x30
[   15.635364] 
[   15.635461] The buggy address belongs to the object at ffff8881028df100
[   15.635461]  which belongs to the cache kmalloc-128 of size 128
[   15.636003] The buggy address is located 0 bytes to the right of
[   15.636003]  allocated 120-byte region [ffff8881028df100, ffff8881028df178)
[   15.636594] 
[   15.636662] The buggy address belongs to the physical page:
[   15.636920] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028df
[   15.637269] flags: 0x200000000000000(node=0|zone=2)
[   15.637497] page_type: f5(slab)
[   15.637670] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   15.637990] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.638315] page dumped because: kasan: bad access detected
[   15.638606] 
[   15.638691] Memory state around the buggy address:
[   15.638900]  ffff8881028df000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.639122]  ffff8881028df080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.639330] >ffff8881028df100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.639534]                                                                 ^
[   15.639743]  ffff8881028df180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.640016]  ffff8881028df200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.640350] ==================================================================