Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.186580] ==================================================================
[   20.186638] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   20.187211] Write of size 121 at addr fff00000c57ee700 by task kunit_try_catch/286
[   20.187381] 
[   20.187417] CPU: 0 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.187535] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.187645] Hardware name: linux,dummy-virt (DT)
[   20.187680] Call trace:
[   20.187706]  show_stack+0x20/0x38 (C)
[   20.187757]  dump_stack_lvl+0x8c/0xd0
[   20.188045]  print_report+0x118/0x608
[   20.188115]  kasan_report+0xdc/0x128
[   20.188165]  kasan_check_range+0x100/0x1a8
[   20.188265]  __kasan_check_write+0x20/0x30
[   20.188319]  strncpy_from_user+0x3c/0x2a0
[   20.188707]  copy_user_test_oob+0x5c0/0xec8
[   20.188783]  kunit_try_run_case+0x170/0x3f0
[   20.188841]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.189051]  kthread+0x328/0x630
[   20.189113]  ret_from_fork+0x10/0x20
[   20.189164] 
[   20.189184] Allocated by task 286:
[   20.189376]  kasan_save_stack+0x3c/0x68
[   20.189478]  kasan_save_track+0x20/0x40
[   20.189860]  kasan_save_alloc_info+0x40/0x58
[   20.190004]  __kasan_kmalloc+0xd4/0xd8
[   20.190265]  __kmalloc_noprof+0x198/0x4c8
[   20.190491]  kunit_kmalloc_array+0x34/0x88
[   20.190756]  copy_user_test_oob+0xac/0xec8
[   20.190840]  kunit_try_run_case+0x170/0x3f0
[   20.191194]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.191348]  kthread+0x328/0x630
[   20.191537]  ret_from_fork+0x10/0x20
[   20.191741] 
[   20.191789] The buggy address belongs to the object at fff00000c57ee700
[   20.191789]  which belongs to the cache kmalloc-128 of size 128
[   20.191983] The buggy address is located 0 bytes inside of
[   20.191983]  allocated 120-byte region [fff00000c57ee700, fff00000c57ee778)
[   20.192208] 
[   20.192391] The buggy address belongs to the physical page:
[   20.192440] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ee
[   20.192714] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.192872] page_type: f5(slab)
[   20.193054] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.193498] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.194033] page dumped because: kasan: bad access detected
[   20.194089] 
[   20.194146] Memory state around the buggy address:
[   20.194362]  fff00000c57ee600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.194589]  fff00000c57ee680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.194644] >fff00000c57ee700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.194959]                                                                 ^
[   20.195257]  fff00000c57ee780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.195514]  fff00000c57ee800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.195810] ==================================================================
[   20.197799] ==================================================================
[   20.198002] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   20.198058] Write of size 1 at addr fff00000c57ee778 by task kunit_try_catch/286
[   20.198110] 
[   20.198170] CPU: 0 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.198256] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.198294] Hardware name: linux,dummy-virt (DT)
[   20.198327] Call trace:
[   20.198350]  show_stack+0x20/0x38 (C)
[   20.198405]  dump_stack_lvl+0x8c/0xd0
[   20.198477]  print_report+0x118/0x608
[   20.198527]  kasan_report+0xdc/0x128
[   20.198586]  __asan_report_store1_noabort+0x20/0x30
[   20.198636]  strncpy_from_user+0x270/0x2a0
[   20.198703]  copy_user_test_oob+0x5c0/0xec8
[   20.198757]  kunit_try_run_case+0x170/0x3f0
[   20.198820]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.198876]  kthread+0x328/0x630
[   20.198917]  ret_from_fork+0x10/0x20
[   20.198990] 
[   20.199019] Allocated by task 286:
[   20.199055]  kasan_save_stack+0x3c/0x68
[   20.199121]  kasan_save_track+0x20/0x40
[   20.199162]  kasan_save_alloc_info+0x40/0x58
[   20.199203]  __kasan_kmalloc+0xd4/0xd8
[   20.199245]  __kmalloc_noprof+0x198/0x4c8
[   20.199285]  kunit_kmalloc_array+0x34/0x88
[   20.199339]  copy_user_test_oob+0xac/0xec8
[   20.199388]  kunit_try_run_case+0x170/0x3f0
[   20.199436]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.199483]  kthread+0x328/0x630
[   20.199516]  ret_from_fork+0x10/0x20
[   20.199554] 
[   20.199801] The buggy address belongs to the object at fff00000c57ee700
[   20.199801]  which belongs to the cache kmalloc-128 of size 128
[   20.200554] The buggy address is located 0 bytes to the right of
[   20.200554]  allocated 120-byte region [fff00000c57ee700, fff00000c57ee778)
[   20.200665] 
[   20.200717] The buggy address belongs to the physical page:
[   20.200751] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ee
[   20.201006] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.201098] page_type: f5(slab)
[   20.201374] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   20.201848] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   20.201914] page dumped because: kasan: bad access detected
[   20.201958] 
[   20.201978] Memory state around the buggy address:
[   20.202014]  fff00000c57ee600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   20.202062]  fff00000c57ee680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.202110] >fff00000c57ee700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   20.202152]                                                                 ^
[   20.202196]  fff00000c57ee780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.202242]  fff00000c57ee800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.202284] ==================================================================

[   15.582845] ==================================================================
[   15.583237] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   15.583747] Write of size 121 at addr ffff8881027e1800 by task kunit_try_catch/302
[   15.583982] 
[   15.584086] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   15.584131] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.584149] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.584173] Call Trace:
[   15.584192]  <TASK>
[   15.584211]  dump_stack_lvl+0x73/0xb0
[   15.584240]  print_report+0xd1/0x650
[   15.584263]  ? __virt_addr_valid+0x1db/0x2d0
[   15.584287]  ? strncpy_from_user+0x2e/0x1d0
[   15.584311]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.584335]  ? strncpy_from_user+0x2e/0x1d0
[   15.584359]  kasan_report+0x141/0x180
[   15.584381]  ? strncpy_from_user+0x2e/0x1d0
[   15.584409]  kasan_check_range+0x10c/0x1c0
[   15.584467]  __kasan_check_write+0x18/0x20
[   15.584488]  strncpy_from_user+0x2e/0x1d0
[   15.584542]  copy_user_test_oob+0x760/0x10f0
[   15.584569]  ? __pfx_copy_user_test_oob+0x10/0x10
[   15.584607]  ? finish_task_switch.isra.0+0x153/0x700
[   15.584631]  ? __switch_to+0x47/0xf50
[   15.584672]  ? __schedule+0x10cc/0x2b60
[   15.584709]  ? __pfx_read_tsc+0x10/0x10
[   15.584743]  ? ktime_get_ts64+0x86/0x230
[   15.584801]  kunit_try_run_case+0x1a5/0x480
[   15.584825]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.584860]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.584884]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.584908]  ? __kthread_parkme+0x82/0x180
[   15.584928]  ? preempt_count_sub+0x50/0x80
[   15.584951]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.584976]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.584999]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.585032]  kthread+0x337/0x6f0
[   15.585051]  ? trace_preempt_on+0x20/0xc0
[   15.585076]  ? __pfx_kthread+0x10/0x10
[   15.585098]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.585119]  ? calculate_sigpending+0x7b/0xa0
[   15.585144]  ? __pfx_kthread+0x10/0x10
[   15.585166]  ret_from_fork+0x116/0x1d0
[   15.585184]  ? __pfx_kthread+0x10/0x10
[   15.585206]  ret_from_fork_asm+0x1a/0x30
[   15.585236]  </TASK>
[   15.585248] 
[   15.593840] Allocated by task 302:
[   15.593986]  kasan_save_stack+0x45/0x70
[   15.594152]  kasan_save_track+0x18/0x40
[   15.594429]  kasan_save_alloc_info+0x3b/0x50
[   15.594708]  __kasan_kmalloc+0xb7/0xc0
[   15.594916]  __kmalloc_noprof+0x1c9/0x500
[   15.595157]  kunit_kmalloc_array+0x25/0x60
[   15.595450]  copy_user_test_oob+0xab/0x10f0
[   15.595792]  kunit_try_run_case+0x1a5/0x480
[   15.596048]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.596270]  kthread+0x337/0x6f0
[   15.596390]  ret_from_fork+0x116/0x1d0
[   15.596559]  ret_from_fork_asm+0x1a/0x30
[   15.596886] 
[   15.597039] The buggy address belongs to the object at ffff8881027e1800
[   15.597039]  which belongs to the cache kmalloc-128 of size 128
[   15.597565] The buggy address is located 0 bytes inside of
[   15.597565]  allocated 120-byte region [ffff8881027e1800, ffff8881027e1878)
[   15.598134] 
[   15.598244] The buggy address belongs to the physical page:
[   15.598540] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e1
[   15.598963] flags: 0x200000000000000(node=0|zone=2)
[   15.599251] page_type: f5(slab)
[   15.599438] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   15.599827] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.600309] page dumped because: kasan: bad access detected
[   15.600660] 
[   15.600780] Memory state around the buggy address:
[   15.601003]  ffff8881027e1700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.601320]  ffff8881027e1780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.601624] >ffff8881027e1800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.601835]                                                                 ^
[   15.602055]  ffff8881027e1880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.602384]  ffff8881027e1900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.602835] ==================================================================
[   15.603932] ==================================================================
[   15.604382] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   15.604816] Write of size 1 at addr ffff8881027e1878 by task kunit_try_catch/302
[   15.605186] 
[   15.605308] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   15.605384] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.605414] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.605448] Call Trace:
[   15.605469]  <TASK>
[   15.605490]  dump_stack_lvl+0x73/0xb0
[   15.605519]  print_report+0xd1/0x650
[   15.605543]  ? __virt_addr_valid+0x1db/0x2d0
[   15.605569]  ? strncpy_from_user+0x1a5/0x1d0
[   15.605619]  ? kasan_complete_mode_report_info+0x2a/0x200
[   15.605651]  ? strncpy_from_user+0x1a5/0x1d0
[   15.605674]  kasan_report+0x141/0x180
[   15.605735]  ? strncpy_from_user+0x1a5/0x1d0
[   15.605764]  __asan_report_store1_noabort+0x1b/0x30
[   15.605796]  strncpy_from_user+0x1a5/0x1d0
[   15.605822]  copy_user_test_oob+0x760/0x10f0
[   15.605849]  ? __pfx_copy_user_test_oob+0x10/0x10
[   15.605872]  ? finish_task_switch.isra.0+0x153/0x700
[   15.605921]  ? __switch_to+0x47/0xf50
[   15.605947]  ? __schedule+0x10cc/0x2b60
[   15.605996]  ? __pfx_read_tsc+0x10/0x10
[   15.606018]  ? ktime_get_ts64+0x86/0x230
[   15.606052]  kunit_try_run_case+0x1a5/0x480
[   15.606075]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.606098]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.606122]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.606145]  ? __kthread_parkme+0x82/0x180
[   15.606191]  ? preempt_count_sub+0x50/0x80
[   15.606215]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.606267]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.606315]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.606338]  kthread+0x337/0x6f0
[   15.606359]  ? trace_preempt_on+0x20/0xc0
[   15.606394]  ? __pfx_kthread+0x10/0x10
[   15.606416]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.606437]  ? calculate_sigpending+0x7b/0xa0
[   15.606462]  ? __pfx_kthread+0x10/0x10
[   15.606484]  ret_from_fork+0x116/0x1d0
[   15.606527]  ? __pfx_kthread+0x10/0x10
[   15.606549]  ret_from_fork_asm+0x1a/0x30
[   15.606608]  </TASK>
[   15.606640] 
[   15.614371] Allocated by task 302:
[   15.614592]  kasan_save_stack+0x45/0x70
[   15.614837]  kasan_save_track+0x18/0x40
[   15.615046]  kasan_save_alloc_info+0x3b/0x50
[   15.615303]  __kasan_kmalloc+0xb7/0xc0
[   15.615506]  __kmalloc_noprof+0x1c9/0x500
[   15.615780]  kunit_kmalloc_array+0x25/0x60
[   15.615986]  copy_user_test_oob+0xab/0x10f0
[   15.616230]  kunit_try_run_case+0x1a5/0x480
[   15.616456]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.616731]  kthread+0x337/0x6f0
[   15.616936]  ret_from_fork+0x116/0x1d0
[   15.617272]  ret_from_fork_asm+0x1a/0x30
[   15.617516] 
[   15.617634] The buggy address belongs to the object at ffff8881027e1800
[   15.617634]  which belongs to the cache kmalloc-128 of size 128
[   15.618130] The buggy address is located 0 bytes to the right of
[   15.618130]  allocated 120-byte region [ffff8881027e1800, ffff8881027e1878)
[   15.618672] 
[   15.618789] The buggy address belongs to the physical page:
[   15.619070] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e1
[   15.619417] flags: 0x200000000000000(node=0|zone=2)
[   15.619644] page_type: f5(slab)
[   15.619813] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   15.620139] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.620375] page dumped because: kasan: bad access detected
[   15.620549] 
[   15.620646] Memory state around the buggy address:
[   15.620874]  ffff8881027e1700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.621249]  ffff8881027e1780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.621612] >ffff8881027e1800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.621961]                                                                 ^
[   15.622284]  ffff8881027e1880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.622629]  ffff8881027e1900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.622937] ==================================================================