Hay
Date
July 19, 2025, 11:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.574788] ==================================================================
[   18.574842] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0
[   18.574895] Write of size 1 at addr fff00000c77d3578 by task kunit_try_catch/286
[   18.574945] 
[   18.574978] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.575166] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.575205] Hardware name: linux,dummy-virt (DT)
[   18.575238] Call trace:
[   18.575264]  show_stack+0x20/0x38 (C)
[   18.575316]  dump_stack_lvl+0x8c/0xd0
[   18.575363]  print_report+0x118/0x5d0
[   18.575433]  kasan_report+0xdc/0x128
[   18.575491]  __asan_report_store1_noabort+0x20/0x30
[   18.575563]  strncpy_from_user+0x270/0x2a0
[   18.575624]  copy_user_test_oob+0x5c0/0xec8
[   18.575675]  kunit_try_run_case+0x170/0x3f0
[   18.575725]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.575779]  kthread+0x328/0x630
[   18.575824]  ret_from_fork+0x10/0x20
[   18.575873] 
[   18.575895] Allocated by task 286:
[   18.575924]  kasan_save_stack+0x3c/0x68
[   18.575967]  kasan_save_track+0x20/0x40
[   18.576015]  kasan_save_alloc_info+0x40/0x58
[   18.576061]  __kasan_kmalloc+0xd4/0xd8
[   18.576104]  __kmalloc_noprof+0x198/0x4c8
[   18.576145]  kunit_kmalloc_array+0x34/0x88
[   18.576192]  copy_user_test_oob+0xac/0xec8
[   18.576233]  kunit_try_run_case+0x170/0x3f0
[   18.576283]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.576335]  kthread+0x328/0x630
[   18.576379]  ret_from_fork+0x10/0x20
[   18.576416] 
[   18.576442] The buggy address belongs to the object at fff00000c77d3500
[   18.576442]  which belongs to the cache kmalloc-128 of size 128
[   18.576502] The buggy address is located 0 bytes to the right of
[   18.576502]  allocated 120-byte region [fff00000c77d3500, fff00000c77d3578)
[   18.577744] 
[   18.577801] The buggy address belongs to the physical page:
[   18.577992] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d3
[   18.578067] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.578290] page_type: f5(slab)
[   18.578343] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.578422] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.578871] page dumped because: kasan: bad access detected
[   18.579163] 
[   18.579627] Memory state around the buggy address:
[   18.579713]  fff00000c77d3400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.579770]  fff00000c77d3480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.580105] >fff00000c77d3500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.580153]                                                                 ^
[   18.580630]  fff00000c77d3580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.580685]  fff00000c77d3600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.580865] ==================================================================
[   18.563544] ==================================================================
[   18.563596] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0
[   18.563652] Write of size 121 at addr fff00000c77d3500 by task kunit_try_catch/286
[   18.564205] 
[   18.564253] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   18.564696] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.564738] Hardware name: linux,dummy-virt (DT)
[   18.564771] Call trace:
[   18.565071]  show_stack+0x20/0x38 (C)
[   18.565164]  dump_stack_lvl+0x8c/0xd0
[   18.565216]  print_report+0x118/0x5d0
[   18.565578]  kasan_report+0xdc/0x128
[   18.565947]  kasan_check_range+0x100/0x1a8
[   18.566177]  __kasan_check_write+0x20/0x30
[   18.566286]  strncpy_from_user+0x3c/0x2a0
[   18.566581]  copy_user_test_oob+0x5c0/0xec8
[   18.566642]  kunit_try_run_case+0x170/0x3f0
[   18.566873]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.567102]  kthread+0x328/0x630
[   18.567587]  ret_from_fork+0x10/0x20
[   18.567692] 
[   18.567797] Allocated by task 286:
[   18.567833]  kasan_save_stack+0x3c/0x68
[   18.567928]  kasan_save_track+0x20/0x40
[   18.568158]  kasan_save_alloc_info+0x40/0x58
[   18.568337]  __kasan_kmalloc+0xd4/0xd8
[   18.568618]  __kmalloc_noprof+0x198/0x4c8
[   18.568839]  kunit_kmalloc_array+0x34/0x88
[   18.568952]  copy_user_test_oob+0xac/0xec8
[   18.569032]  kunit_try_run_case+0x170/0x3f0
[   18.569099]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.569241]  kthread+0x328/0x630
[   18.569439]  ret_from_fork+0x10/0x20
[   18.569839] 
[   18.569994] The buggy address belongs to the object at fff00000c77d3500
[   18.569994]  which belongs to the cache kmalloc-128 of size 128
[   18.570150] The buggy address is located 0 bytes inside of
[   18.570150]  allocated 120-byte region [fff00000c77d3500, fff00000c77d3578)
[   18.570286] 
[   18.570394] The buggy address belongs to the physical page:
[   18.570436] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d3
[   18.570489] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.570727] page_type: f5(slab)
[   18.571386] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.571501] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.571722] page dumped because: kasan: bad access detected
[   18.571951] 
[   18.572272] Memory state around the buggy address:
[   18.572340]  fff00000c77d3400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.572392]  fff00000c77d3480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.572839] >fff00000c77d3500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.573074]                                                                 ^
[   18.573198]  fff00000c77d3580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.573455]  fff00000c77d3600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.573597] ==================================================================

[   16.241197] ==================================================================
[   16.241628] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0
[   16.241871] Write of size 121 at addr ffff888102f59b00 by task kunit_try_catch/303
[   16.242253] 
[   16.242367] CPU: 1 UID: 0 PID: 303 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.242412] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.242424] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.242446] Call Trace:
[   16.242465]  <TASK>
[   16.242483]  dump_stack_lvl+0x73/0xb0
[   16.242521]  print_report+0xd1/0x610
[   16.242544]  ? __virt_addr_valid+0x1db/0x2d0
[   16.242567]  ? strncpy_from_user+0x2e/0x1d0
[   16.242591]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.242615]  ? strncpy_from_user+0x2e/0x1d0
[   16.242640]  kasan_report+0x141/0x180
[   16.242662]  ? strncpy_from_user+0x2e/0x1d0
[   16.242691]  kasan_check_range+0x10c/0x1c0
[   16.242714]  __kasan_check_write+0x18/0x20
[   16.242735]  strncpy_from_user+0x2e/0x1d0
[   16.242758]  ? __kasan_check_read+0x15/0x20
[   16.242779]  copy_user_test_oob+0x760/0x10f0
[   16.242807]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.242830]  ? finish_task_switch.isra.0+0x153/0x700
[   16.242854]  ? __switch_to+0x47/0xf50
[   16.242880]  ? __schedule+0x10cc/0x2b60
[   16.242903]  ? __pfx_read_tsc+0x10/0x10
[   16.242926]  ? ktime_get_ts64+0x86/0x230
[   16.242950]  kunit_try_run_case+0x1a5/0x480
[   16.242976]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.243000]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.243025]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.243050]  ? __kthread_parkme+0x82/0x180
[   16.243071]  ? preempt_count_sub+0x50/0x80
[   16.243094]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.243119]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.243143]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.243177]  kthread+0x337/0x6f0
[   16.243197]  ? trace_preempt_on+0x20/0xc0
[   16.243221]  ? __pfx_kthread+0x10/0x10
[   16.243242]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.243264]  ? calculate_sigpending+0x7b/0xa0
[   16.243289]  ? __pfx_kthread+0x10/0x10
[   16.243310]  ret_from_fork+0x116/0x1d0
[   16.243330]  ? __pfx_kthread+0x10/0x10
[   16.243351]  ret_from_fork_asm+0x1a/0x30
[   16.243384]  </TASK>
[   16.243394] 
[   16.251046] Allocated by task 303:
[   16.251251]  kasan_save_stack+0x45/0x70
[   16.251398]  kasan_save_track+0x18/0x40
[   16.251546]  kasan_save_alloc_info+0x3b/0x50
[   16.251698]  __kasan_kmalloc+0xb7/0xc0
[   16.251898]  __kmalloc_noprof+0x1c9/0x500
[   16.252106]  kunit_kmalloc_array+0x25/0x60
[   16.252508]  copy_user_test_oob+0xab/0x10f0
[   16.252665]  kunit_try_run_case+0x1a5/0x480
[   16.252813]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.252994]  kthread+0x337/0x6f0
[   16.253174]  ret_from_fork+0x116/0x1d0
[   16.253364]  ret_from_fork_asm+0x1a/0x30
[   16.253576] 
[   16.253672] The buggy address belongs to the object at ffff888102f59b00
[   16.253672]  which belongs to the cache kmalloc-128 of size 128
[   16.254258] The buggy address is located 0 bytes inside of
[   16.254258]  allocated 120-byte region [ffff888102f59b00, ffff888102f59b78)
[   16.254747] 
[   16.254847] The buggy address belongs to the physical page:
[   16.255074] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f59
[   16.255416] flags: 0x200000000000000(node=0|zone=2)
[   16.255641] page_type: f5(slab)
[   16.255809] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.256100] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.256549] page dumped because: kasan: bad access detected
[   16.256782] 
[   16.256862] Memory state around the buggy address:
[   16.257087]  ffff888102f59a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.257406]  ffff888102f59a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.257708] >ffff888102f59b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.258001]                                                                 ^
[   16.258351]  ffff888102f59b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.258651]  ffff888102f59c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.258930] ==================================================================
[   16.259485] ==================================================================
[   16.259820] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0
[   16.260176] Write of size 1 at addr ffff888102f59b78 by task kunit_try_catch/303
[   16.260471] 
[   16.260569] CPU: 1 UID: 0 PID: 303 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   16.260613] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.260625] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.260647] Call Trace:
[   16.260665]  <TASK>
[   16.260681]  dump_stack_lvl+0x73/0xb0
[   16.260709]  print_report+0xd1/0x610
[   16.260732]  ? __virt_addr_valid+0x1db/0x2d0
[   16.260756]  ? strncpy_from_user+0x1a5/0x1d0
[   16.260778]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.260802]  ? strncpy_from_user+0x1a5/0x1d0
[   16.260826]  kasan_report+0x141/0x180
[   16.260848]  ? strncpy_from_user+0x1a5/0x1d0
[   16.260876]  __asan_report_store1_noabort+0x1b/0x30
[   16.260902]  strncpy_from_user+0x1a5/0x1d0
[   16.260929]  copy_user_test_oob+0x760/0x10f0
[   16.260956]  ? __pfx_copy_user_test_oob+0x10/0x10
[   16.260979]  ? finish_task_switch.isra.0+0x153/0x700
[   16.261004]  ? __switch_to+0x47/0xf50
[   16.261030]  ? __schedule+0x10cc/0x2b60
[   16.261052]  ? __pfx_read_tsc+0x10/0x10
[   16.261074]  ? ktime_get_ts64+0x86/0x230
[   16.261099]  kunit_try_run_case+0x1a5/0x480
[   16.261124]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.261147]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.261172]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.261197]  ? __kthread_parkme+0x82/0x180
[   16.261219]  ? preempt_count_sub+0x50/0x80
[   16.261243]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.261268]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.261293]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.261318]  kthread+0x337/0x6f0
[   16.261338]  ? trace_preempt_on+0x20/0xc0
[   16.261362]  ? __pfx_kthread+0x10/0x10
[   16.261383]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.261405]  ? calculate_sigpending+0x7b/0xa0
[   16.261431]  ? __pfx_kthread+0x10/0x10
[   16.261453]  ret_from_fork+0x116/0x1d0
[   16.261485]  ? __pfx_kthread+0x10/0x10
[   16.261517]  ret_from_fork_asm+0x1a/0x30
[   16.261549]  </TASK>
[   16.261560] 
[   16.268683] Allocated by task 303:
[   16.268843]  kasan_save_stack+0x45/0x70
[   16.269011]  kasan_save_track+0x18/0x40
[   16.269147]  kasan_save_alloc_info+0x3b/0x50
[   16.269365]  __kasan_kmalloc+0xb7/0xc0
[   16.269569]  __kmalloc_noprof+0x1c9/0x500
[   16.269735]  kunit_kmalloc_array+0x25/0x60
[   16.269926]  copy_user_test_oob+0xab/0x10f0
[   16.270133]  kunit_try_run_case+0x1a5/0x480
[   16.270327]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.270571]  kthread+0x337/0x6f0
[   16.270730]  ret_from_fork+0x116/0x1d0
[   16.270915]  ret_from_fork_asm+0x1a/0x30
[   16.271063] 
[   16.271135] The buggy address belongs to the object at ffff888102f59b00
[   16.271135]  which belongs to the cache kmalloc-128 of size 128
[   16.271656] The buggy address is located 0 bytes to the right of
[   16.271656]  allocated 120-byte region [ffff888102f59b00, ffff888102f59b78)
[   16.272114] 
[   16.272187] The buggy address belongs to the physical page:
[   16.272360] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f59
[   16.273273] flags: 0x200000000000000(node=0|zone=2)
[   16.273455] page_type: f5(slab)
[   16.273599] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.273864] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.274236] page dumped because: kasan: bad access detected
[   16.274487] 
[   16.274591] Memory state around the buggy address:
[   16.274813]  ffff888102f59a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.275075]  ffff888102f59a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.275319] >ffff888102f59b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.275544]                                                                 ^
[   16.275759]  ffff888102f59b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.276052]  ffff888102f59c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.276394] ==================================================================