Hay
Date
July 17, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.558699] ==================================================================
[   19.558765] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   19.558822] Write of size 121 at addr fff00000c79f8300 by task kunit_try_catch/285
[   19.558886] 
[   19.558963] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   19.559190] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.559236] Hardware name: linux,dummy-virt (DT)
[   19.559274] Call trace:
[   19.559317]  show_stack+0x20/0x38 (C)
[   19.559369]  dump_stack_lvl+0x8c/0xd0
[   19.559446]  print_report+0x118/0x5d0
[   19.559495]  kasan_report+0xdc/0x128
[   19.559542]  kasan_check_range+0x100/0x1a8
[   19.559882]  __kasan_check_write+0x20/0x30
[   19.559974]  strncpy_from_user+0x3c/0x2a0
[   19.560027]  copy_user_test_oob+0x5c0/0xec8
[   19.560094]  kunit_try_run_case+0x170/0x3f0
[   19.560422]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.560529]  kthread+0x328/0x630
[   19.560604]  ret_from_fork+0x10/0x20
[   19.560745] 
[   19.560793] Allocated by task 285:
[   19.560879]  kasan_save_stack+0x3c/0x68
[   19.560936]  kasan_save_track+0x20/0x40
[   19.561045]  kasan_save_alloc_info+0x40/0x58
[   19.561110]  __kasan_kmalloc+0xd4/0xd8
[   19.561175]  __kmalloc_noprof+0x198/0x4c8
[   19.561312]  kunit_kmalloc_array+0x34/0x88
[   19.561390]  copy_user_test_oob+0xac/0xec8
[   19.561466]  kunit_try_run_case+0x170/0x3f0
[   19.561504]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.561549]  kthread+0x328/0x630
[   19.561606]  ret_from_fork+0x10/0x20
[   19.561642] 
[   19.561664] The buggy address belongs to the object at fff00000c79f8300
[   19.561664]  which belongs to the cache kmalloc-128 of size 128
[   19.561723] The buggy address is located 0 bytes inside of
[   19.561723]  allocated 120-byte region [fff00000c79f8300, fff00000c79f8378)
[   19.561787] 
[   19.561808] The buggy address belongs to the physical page:
[   19.561840] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079f8
[   19.561906] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.561954] page_type: f5(slab)
[   19.562119] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.562176] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.562227] page dumped because: kasan: bad access detected
[   19.562283] 
[   19.562332] Memory state around the buggy address:
[   19.562378]  fff00000c79f8200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.562423]  fff00000c79f8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.562491] >fff00000c79f8300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.562546]                                                                 ^
[   19.562592]  fff00000c79f8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.562636]  fff00000c79f8400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.562677] ==================================================================
[   19.563605] ==================================================================
[   19.563837] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   19.563946] Write of size 1 at addr fff00000c79f8378 by task kunit_try_catch/285
[   19.564119] 
[   19.564293] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   19.564395] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.564502] Hardware name: linux,dummy-virt (DT)
[   19.564559] Call trace:
[   19.564583]  show_stack+0x20/0x38 (C)
[   19.564634]  dump_stack_lvl+0x8c/0xd0
[   19.564704]  print_report+0x118/0x5d0
[   19.564752]  kasan_report+0xdc/0x128
[   19.564958]  __asan_report_store1_noabort+0x20/0x30
[   19.565114]  strncpy_from_user+0x270/0x2a0
[   19.565300]  copy_user_test_oob+0x5c0/0xec8
[   19.565412]  kunit_try_run_case+0x170/0x3f0
[   19.565806]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.565897]  kthread+0x328/0x630
[   19.566013]  ret_from_fork+0x10/0x20
[   19.566112] 
[   19.566180] Allocated by task 285:
[   19.566299]  kasan_save_stack+0x3c/0x68
[   19.566358]  kasan_save_track+0x20/0x40
[   19.566423]  kasan_save_alloc_info+0x40/0x58
[   19.566467]  __kasan_kmalloc+0xd4/0xd8
[   19.566504]  __kmalloc_noprof+0x198/0x4c8
[   19.566838]  kunit_kmalloc_array+0x34/0x88
[   19.566915]  copy_user_test_oob+0xac/0xec8
[   19.567081]  kunit_try_run_case+0x170/0x3f0
[   19.567136]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.567198]  kthread+0x328/0x630
[   19.567631]  ret_from_fork+0x10/0x20
[   19.567669] 
[   19.567691] The buggy address belongs to the object at fff00000c79f8300
[   19.567691]  which belongs to the cache kmalloc-128 of size 128
[   19.567785] The buggy address is located 0 bytes to the right of
[   19.567785]  allocated 120-byte region [fff00000c79f8300, fff00000c79f8378)
[   19.567851] 
[   19.567882] The buggy address belongs to the physical page:
[   19.567914] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079f8
[   19.568121] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.568179] page_type: f5(slab)
[   19.568219] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.568501] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.568587] page dumped because: kasan: bad access detected
[   19.568700] 
[   19.568761] Memory state around the buggy address:
[   19.568809]  fff00000c79f8200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.568853]  fff00000c79f8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.568926] >fff00000c79f8300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.568984]                                                                 ^
[   19.569109]  fff00000c79f8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.569185]  fff00000c79f8400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.569268] ==================================================================

[   16.442698] ==================================================================
[   16.443023] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   16.443366] Write of size 121 at addr ffff888102f5e000 by task kunit_try_catch/302
[   16.443713] 
[   16.443833] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.443879] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.443891] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.443915] Call Trace:
[   16.443936]  <TASK>
[   16.443956]  dump_stack_lvl+0x73/0xb0
[   16.443986]  print_report+0xd1/0x610
[   16.444010]  ? __virt_addr_valid+0x1db/0x2d0
[   16.444035]  ? strncpy_from_user+0x2e/0x1d0
[   16.444071]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.444095]  ? strncpy_from_user+0x2e/0x1d0
[   16.444118]  kasan_report+0x141/0x180
[   16.444141]  ? strncpy_from_user+0x2e/0x1d0
[   16.444171]  kasan_check_range+0x10c/0x1c0
[   16.444195]  __kasan_check_write+0x18/0x20
[   16.444215]  strncpy_from_user+0x2e/0x1d0
[   16.444238]  ? __kasan_check_read+0x15/0x20
[   16.444260]  copy_user_test_oob+0x760/0x10f0
[   16.444287]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.444310]  ? finish_task_switch.isra.0+0x153/0x700
[   16.444334]  ? __switch_to+0x47/0xf50
[   16.444362]  ? __schedule+0x10cc/0x2b60
[   16.444386]  ? __pfx_read_tsc+0x10/0x10
[   16.444408]  ? ktime_get_ts64+0x86/0x230
[   16.444433]  kunit_try_run_case+0x1a5/0x480
[   16.444459]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.444482]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.444508]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.444532]  ? __kthread_parkme+0x82/0x180
[   16.444554]  ? preempt_count_sub+0x50/0x80
[   16.444578]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.444614]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.444639]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.444664]  kthread+0x337/0x6f0
[   16.444684]  ? trace_preempt_on+0x20/0xc0
[   16.444709]  ? __pfx_kthread+0x10/0x10
[   16.444730]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.444752]  ? calculate_sigpending+0x7b/0xa0
[   16.444777]  ? __pfx_kthread+0x10/0x10
[   16.444799]  ret_from_fork+0x116/0x1d0
[   16.444818]  ? __pfx_kthread+0x10/0x10
[   16.444838]  ret_from_fork_asm+0x1a/0x30
[   16.444871]  </TASK>
[   16.444882] 
[   16.451979] Allocated by task 302:
[   16.452118]  kasan_save_stack+0x45/0x70
[   16.452276]  kasan_save_track+0x18/0x40
[   16.452472]  kasan_save_alloc_info+0x3b/0x50
[   16.452686]  __kasan_kmalloc+0xb7/0xc0
[   16.452877]  __kmalloc_noprof+0x1c9/0x500
[   16.453090]  kunit_kmalloc_array+0x25/0x60
[   16.453295]  copy_user_test_oob+0xab/0x10f0
[   16.453506]  kunit_try_run_case+0x1a5/0x480
[   16.453714]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.453976]  kthread+0x337/0x6f0
[   16.454172]  ret_from_fork+0x116/0x1d0
[   16.454372]  ret_from_fork_asm+0x1a/0x30
[   16.454573] 
[   16.454670] The buggy address belongs to the object at ffff888102f5e000
[   16.454670]  which belongs to the cache kmalloc-128 of size 128
[   16.455164] The buggy address is located 0 bytes inside of
[   16.455164]  allocated 120-byte region [ffff888102f5e000, ffff888102f5e078)
[   16.455528] 
[   16.455713] The buggy address belongs to the physical page:
[   16.455973] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f5e
[   16.456353] flags: 0x200000000000000(node=0|zone=2)
[   16.456604] page_type: f5(slab)
[   16.456778] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.457114] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.457405] page dumped because: kasan: bad access detected
[   16.457644] 
[   16.457728] Memory state around the buggy address:
[   16.457887]  ffff888102f5df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.458117]  ffff888102f5df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.458340] >ffff888102f5e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.458555]                                                                 ^
[   16.458876]  ffff888102f5e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.459207]  ffff888102f5e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.459589] ==================================================================
[   16.460250] ==================================================================
[   16.460604] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   16.460963] Write of size 1 at addr ffff888102f5e078 by task kunit_try_catch/302
[   16.461280] 
[   16.461380] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.461426] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.461439] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.461462] Call Trace:
[   16.461482]  <TASK>
[   16.461503]  dump_stack_lvl+0x73/0xb0
[   16.461533]  print_report+0xd1/0x610
[   16.461556]  ? __virt_addr_valid+0x1db/0x2d0
[   16.461580]  ? strncpy_from_user+0x1a5/0x1d0
[   16.461612]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.461636]  ? strncpy_from_user+0x1a5/0x1d0
[   16.461662]  kasan_report+0x141/0x180
[   16.461684]  ? strncpy_from_user+0x1a5/0x1d0
[   16.461713]  __asan_report_store1_noabort+0x1b/0x30
[   16.461739]  strncpy_from_user+0x1a5/0x1d0
[   16.461765]  copy_user_test_oob+0x760/0x10f0
[   16.461793]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.461816]  ? finish_task_switch.isra.0+0x153/0x700
[   16.461840]  ? __switch_to+0x47/0xf50
[   16.461867]  ? __schedule+0x10cc/0x2b60
[   16.461892]  ? __pfx_read_tsc+0x10/0x10
[   16.461913]  ? ktime_get_ts64+0x86/0x230
[   16.461939]  kunit_try_run_case+0x1a5/0x480
[   16.461966]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.461989]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.462014]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.462039]  ? __kthread_parkme+0x82/0x180
[   16.462075]  ? preempt_count_sub+0x50/0x80
[   16.462100]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.462125]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.462149]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.462175]  kthread+0x337/0x6f0
[   16.462195]  ? trace_preempt_on+0x20/0xc0
[   16.462225]  ? __pfx_kthread+0x10/0x10
[   16.462247]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.462268]  ? calculate_sigpending+0x7b/0xa0
[   16.462293]  ? __pfx_kthread+0x10/0x10
[   16.462316]  ret_from_fork+0x116/0x1d0
[   16.462334]  ? __pfx_kthread+0x10/0x10
[   16.462354]  ret_from_fork_asm+0x1a/0x30
[   16.462389]  </TASK>
[   16.462399] 
[   16.469683] Allocated by task 302:
[   16.469813]  kasan_save_stack+0x45/0x70
[   16.469957]  kasan_save_track+0x18/0x40
[   16.470122]  kasan_save_alloc_info+0x3b/0x50
[   16.470339]  __kasan_kmalloc+0xb7/0xc0
[   16.470528]  __kmalloc_noprof+0x1c9/0x500
[   16.470776]  kunit_kmalloc_array+0x25/0x60
[   16.470934]  copy_user_test_oob+0xab/0x10f0
[   16.471131]  kunit_try_run_case+0x1a5/0x480
[   16.471339]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.471521]  kthread+0x337/0x6f0
[   16.471783]  ret_from_fork+0x116/0x1d0
[   16.471972]  ret_from_fork_asm+0x1a/0x30
[   16.472133] 
[   16.472205] The buggy address belongs to the object at ffff888102f5e000
[   16.472205]  which belongs to the cache kmalloc-128 of size 128
[   16.472566] The buggy address is located 0 bytes to the right of
[   16.472566]  allocated 120-byte region [ffff888102f5e000, ffff888102f5e078)
[   16.473133] 
[   16.473258] The buggy address belongs to the physical page:
[   16.473518] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f5e
[   16.473875] flags: 0x200000000000000(node=0|zone=2)
[   16.474041] page_type: f5(slab)
[   16.474175] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.474410] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.474748] page dumped because: kasan: bad access detected
[   16.475000] 
[   16.475158] Memory state around the buggy address:
[   16.475381]  ffff888102f5df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.475849]  ffff888102f5df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.476089] >ffff888102f5e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.476305]                                                                 ^
[   16.476521]  ffff888102f5e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.476874]  ffff888102f5e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.477204] ==================================================================