Hay
Date
July 16, 2025, 3:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.570297] ==================================================================
[   19.570364] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   19.570580] Write of size 121 at addr fff00000c7939000 by task kunit_try_catch/285
[   19.570854] 
[   19.570904] CPU: 1 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   19.571314] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.571429] Hardware name: linux,dummy-virt (DT)
[   19.571487] Call trace:
[   19.571511]  show_stack+0x20/0x38 (C)
[   19.571583]  dump_stack_lvl+0x8c/0xd0
[   19.571635]  print_report+0x118/0x5d0
[   19.571695]  kasan_report+0xdc/0x128
[   19.571754]  kasan_check_range+0x100/0x1a8
[   19.571805]  __kasan_check_write+0x20/0x30
[   19.571852]  strncpy_from_user+0x3c/0x2a0
[   19.571903]  copy_user_test_oob+0x5c0/0xec8
[   19.571974]  kunit_try_run_case+0x170/0x3f0
[   19.572177]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.572903]  kthread+0x328/0x630
[   19.573322]  ret_from_fork+0x10/0x20
[   19.573557] 
[   19.574075] Allocated by task 285:
[   19.574386]  kasan_save_stack+0x3c/0x68
[   19.574437]  kasan_save_track+0x20/0x40
[   19.575108]  kasan_save_alloc_info+0x40/0x58
[   19.575165]  __kasan_kmalloc+0xd4/0xd8
[   19.575205]  __kmalloc_noprof+0x198/0x4c8
[   19.576140]  kunit_kmalloc_array+0x34/0x88
[   19.576865]  copy_user_test_oob+0xac/0xec8
[   19.577325]  kunit_try_run_case+0x170/0x3f0
[   19.577432]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.578000]  kthread+0x328/0x630
[   19.578208]  ret_from_fork+0x10/0x20
[   19.578538] 
[   19.578570] The buggy address belongs to the object at fff00000c7939000
[   19.578570]  which belongs to the cache kmalloc-128 of size 128
[   19.578638] The buggy address is located 0 bytes inside of
[   19.578638]  allocated 120-byte region [fff00000c7939000, fff00000c7939078)
[   19.579770] 
[   19.579799] The buggy address belongs to the physical page:
[   19.579833] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107939
[   19.580022] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.580880] page_type: f5(slab)
[   19.581356] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.581869] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.582492] page dumped because: kasan: bad access detected
[   19.582756] 
[   19.582780] Memory state around the buggy address:
[   19.583288]  fff00000c7938f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.583345]  fff00000c7938f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.583392] >fff00000c7939000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.583854]                                                                 ^
[   19.584196]  fff00000c7939080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.584286]  fff00000c7939100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.585215] ==================================================================
[   19.588944] ==================================================================
[   19.589003] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   19.589059] Write of size 1 at addr fff00000c7939078 by task kunit_try_catch/285
[   19.589113] 
[   19.589146] CPU: 1 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   19.592115] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.592482] Hardware name: linux,dummy-virt (DT)
[   19.593211] Call trace:
[   19.593293]  show_stack+0x20/0x38 (C)
[   19.594391]  dump_stack_lvl+0x8c/0xd0
[   19.594795]  print_report+0x118/0x5d0
[   19.594889]  kasan_report+0xdc/0x128
[   19.595814]  __asan_report_store1_noabort+0x20/0x30
[   19.596564]  strncpy_from_user+0x270/0x2a0
[   19.597118]  copy_user_test_oob+0x5c0/0xec8
[   19.597755]  kunit_try_run_case+0x170/0x3f0
[   19.597909]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.597965]  kthread+0x328/0x630
[   19.598010]  ret_from_fork+0x10/0x20
[   19.598060] 
[   19.598083] Allocated by task 285:
[   19.598942]  kasan_save_stack+0x3c/0x68
[   19.599003]  kasan_save_track+0x20/0x40
[   19.599414]  kasan_save_alloc_info+0x40/0x58
[   19.600195]  __kasan_kmalloc+0xd4/0xd8
[   19.601125]  __kmalloc_noprof+0x198/0x4c8
[   19.601325]  kunit_kmalloc_array+0x34/0x88
[   19.601368]  copy_user_test_oob+0xac/0xec8
[   19.601411]  kunit_try_run_case+0x170/0x3f0
[   19.601452]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.601499]  kthread+0x328/0x630
[   19.602381]  ret_from_fork+0x10/0x20
[   19.602623] 
[   19.602648] The buggy address belongs to the object at fff00000c7939000
[   19.602648]  which belongs to the cache kmalloc-128 of size 128
[   19.602728] The buggy address is located 0 bytes to the right of
[   19.602728]  allocated 120-byte region [fff00000c7939000, fff00000c7939078)
[   19.603615] 
[   19.603991] The buggy address belongs to the physical page:
[   19.604028] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107939
[   19.604645] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.604871] page_type: f5(slab)
[   19.605701] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.605916] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   19.606668] page dumped because: kasan: bad access detected
[   19.606836] 
[   19.606858] Memory state around the buggy address:
[   19.607590]  fff00000c7938f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.607831]  fff00000c7938f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.608382] >fff00000c7939000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.608508]                                                                 ^
[   19.609175]  fff00000c7939080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.609316]  fff00000c7939100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.609652] ==================================================================

[   16.828470] ==================================================================
[   16.828815] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   16.829130] Write of size 1 at addr ffff88810307db78 by task kunit_try_catch/302
[   16.829358] 
[   16.829441] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.829496] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.829509] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.829530] Call Trace:
[   16.829546]  <TASK>
[   16.829561]  dump_stack_lvl+0x73/0xb0
[   16.829589]  print_report+0xd1/0x610
[   16.829615]  ? __virt_addr_valid+0x1db/0x2d0
[   16.829639]  ? strncpy_from_user+0x1a5/0x1d0
[   16.829663]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.829689]  ? strncpy_from_user+0x1a5/0x1d0
[   16.829715]  kasan_report+0x141/0x180
[   16.829738]  ? strncpy_from_user+0x1a5/0x1d0
[   16.829779]  __asan_report_store1_noabort+0x1b/0x30
[   16.829807]  strncpy_from_user+0x1a5/0x1d0
[   16.829835]  copy_user_test_oob+0x760/0x10f0
[   16.829863]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.829889]  ? finish_task_switch.isra.0+0x153/0x700
[   16.829913]  ? __switch_to+0x47/0xf50
[   16.829939]  ? __schedule+0x10cc/0x2b60
[   16.829963]  ? __pfx_read_tsc+0x10/0x10
[   16.829986]  ? ktime_get_ts64+0x86/0x230
[   16.830011]  kunit_try_run_case+0x1a5/0x480
[   16.830037]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.830062]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.830089]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.830114]  ? __kthread_parkme+0x82/0x180
[   16.830136]  ? preempt_count_sub+0x50/0x80
[   16.830161]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.830188]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.830214]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.830242]  kthread+0x337/0x6f0
[   16.830262]  ? trace_preempt_on+0x20/0xc0
[   16.830287]  ? __pfx_kthread+0x10/0x10
[   16.830309]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.830332]  ? calculate_sigpending+0x7b/0xa0
[   16.830357]  ? __pfx_kthread+0x10/0x10
[   16.830380]  ret_from_fork+0x116/0x1d0
[   16.830399]  ? __pfx_kthread+0x10/0x10
[   16.830420]  ret_from_fork_asm+0x1a/0x30
[   16.830453]  </TASK>
[   16.830463] 
[   16.837974] Allocated by task 302:
[   16.838154]  kasan_save_stack+0x45/0x70
[   16.838337]  kasan_save_track+0x18/0x40
[   16.838546]  kasan_save_alloc_info+0x3b/0x50
[   16.838710]  __kasan_kmalloc+0xb7/0xc0
[   16.838912]  __kmalloc_noprof+0x1c9/0x500
[   16.839089]  kunit_kmalloc_array+0x25/0x60
[   16.839293]  copy_user_test_oob+0xab/0x10f0
[   16.839459]  kunit_try_run_case+0x1a5/0x480
[   16.839607]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.839794]  kthread+0x337/0x6f0
[   16.839917]  ret_from_fork+0x116/0x1d0
[   16.840182]  ret_from_fork_asm+0x1a/0x30
[   16.840445] 
[   16.840539] The buggy address belongs to the object at ffff88810307db00
[   16.840539]  which belongs to the cache kmalloc-128 of size 128
[   16.841074] The buggy address is located 0 bytes to the right of
[   16.841074]  allocated 120-byte region [ffff88810307db00, ffff88810307db78)
[   16.841562] 
[   16.841634] The buggy address belongs to the physical page:
[   16.842621] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10307d
[   16.843008] flags: 0x200000000000000(node=0|zone=2)
[   16.843250] page_type: f5(slab)
[   16.843419] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.844097] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.844601] page dumped because: kasan: bad access detected
[   16.844905] 
[   16.845137] Memory state around the buggy address:
[   16.845480]  ffff88810307da00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.845801]  ffff88810307da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.846093] >ffff88810307db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.846384]                                                                 ^
[   16.847108]  ffff88810307db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.847588]  ffff88810307dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.848096] ==================================================================
[   16.810462] ==================================================================
[   16.810748] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   16.811119] Write of size 121 at addr ffff88810307db00 by task kunit_try_catch/302
[   16.811455] 
[   16.811540] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.811584] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.811596] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.811618] Call Trace:
[   16.811633]  <TASK>
[   16.811649]  dump_stack_lvl+0x73/0xb0
[   16.811679]  print_report+0xd1/0x610
[   16.811703]  ? __virt_addr_valid+0x1db/0x2d0
[   16.811727]  ? strncpy_from_user+0x2e/0x1d0
[   16.811751]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.811789]  ? strncpy_from_user+0x2e/0x1d0
[   16.811814]  kasan_report+0x141/0x180
[   16.811838]  ? strncpy_from_user+0x2e/0x1d0
[   16.811867]  kasan_check_range+0x10c/0x1c0
[   16.811892]  __kasan_check_write+0x18/0x20
[   16.811913]  strncpy_from_user+0x2e/0x1d0
[   16.811949]  ? __kasan_check_read+0x15/0x20
[   16.811972]  copy_user_test_oob+0x760/0x10f0
[   16.812000]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.812025]  ? finish_task_switch.isra.0+0x153/0x700
[   16.812050]  ? __switch_to+0x47/0xf50
[   16.812076]  ? __schedule+0x10cc/0x2b60
[   16.812099]  ? __pfx_read_tsc+0x10/0x10
[   16.812122]  ? ktime_get_ts64+0x86/0x230
[   16.812146]  kunit_try_run_case+0x1a5/0x480
[   16.812173]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.812199]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.812225]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.812251]  ? __kthread_parkme+0x82/0x180
[   16.812272]  ? preempt_count_sub+0x50/0x80
[   16.812297]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.812323]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.812350]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.812377]  kthread+0x337/0x6f0
[   16.812398]  ? trace_preempt_on+0x20/0xc0
[   16.812423]  ? __pfx_kthread+0x10/0x10
[   16.812456]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.812478]  ? calculate_sigpending+0x7b/0xa0
[   16.812504]  ? __pfx_kthread+0x10/0x10
[   16.812527]  ret_from_fork+0x116/0x1d0
[   16.812546]  ? __pfx_kthread+0x10/0x10
[   16.812567]  ret_from_fork_asm+0x1a/0x30
[   16.812600]  </TASK>
[   16.812611] 
[   16.820329] Allocated by task 302:
[   16.820506]  kasan_save_stack+0x45/0x70
[   16.820736]  kasan_save_track+0x18/0x40
[   16.820941]  kasan_save_alloc_info+0x3b/0x50
[   16.821144]  __kasan_kmalloc+0xb7/0xc0
[   16.821289]  __kmalloc_noprof+0x1c9/0x500
[   16.821489]  kunit_kmalloc_array+0x25/0x60
[   16.821642]  copy_user_test_oob+0xab/0x10f0
[   16.821906]  kunit_try_run_case+0x1a5/0x480
[   16.822221]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.822435]  kthread+0x337/0x6f0
[   16.822567]  ret_from_fork+0x116/0x1d0
[   16.822704]  ret_from_fork_asm+0x1a/0x30
[   16.822858] 
[   16.822932] The buggy address belongs to the object at ffff88810307db00
[   16.822932]  which belongs to the cache kmalloc-128 of size 128
[   16.823507] The buggy address is located 0 bytes inside of
[   16.823507]  allocated 120-byte region [ffff88810307db00, ffff88810307db78)
[   16.823959] 
[   16.824037] The buggy address belongs to the physical page:
[   16.824210] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10307d
[   16.824485] flags: 0x200000000000000(node=0|zone=2)
[   16.824718] page_type: f5(slab)
[   16.824897] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.825245] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.825599] page dumped because: kasan: bad access detected
[   16.825868] 
[   16.825970] Memory state around the buggy address:
[   16.826208]  ffff88810307da00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.826540]  ffff88810307da80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.826797] >ffff88810307db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.827025]                                                                 ^
[   16.827341]  ffff88810307db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.827589]  ffff88810307dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.827847] ==================================================================