Date
June 17, 2025, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.173035] ================================================================== [ 20.173099] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0 [ 20.173170] Write of size 121 at addr fff00000c522f000 by task kunit_try_catch/294 [ 20.173233] [ 20.173341] CPU: 1 UID: 0 PID: 294 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT [ 20.173625] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.173658] Hardware name: linux,dummy-virt (DT) [ 20.173694] Call trace: [ 20.173725] show_stack+0x20/0x38 (C) [ 20.174355] dump_stack_lvl+0x8c/0xd0 [ 20.174687] print_report+0x118/0x608 [ 20.174774] kasan_report+0xdc/0x128 [ 20.174823] kasan_check_range+0x100/0x1a8 [ 20.174876] __kasan_check_write+0x20/0x30 [ 20.174924] strncpy_from_user+0x3c/0x2a0 [ 20.174986] copy_user_test_oob+0x5c0/0xec8 [ 20.175722] kunit_try_run_case+0x170/0x3f0 [ 20.175890] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.176005] kthread+0x328/0x630 [ 20.176053] ret_from_fork+0x10/0x20 [ 20.176106] [ 20.176127] Allocated by task 294: [ 20.176171] kasan_save_stack+0x3c/0x68 [ 20.176283] kasan_save_track+0x20/0x40 [ 20.176325] kasan_save_alloc_info+0x40/0x58 [ 20.176363] __kasan_kmalloc+0xd4/0xd8 [ 20.176410] __kmalloc_noprof+0x198/0x4c8 [ 20.176755] kunit_kmalloc_array+0x34/0x88 [ 20.176849] copy_user_test_oob+0xac/0xec8 [ 20.176891] kunit_try_run_case+0x170/0x3f0 [ 20.177242] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.177304] kthread+0x328/0x630 [ 20.177340] ret_from_fork+0x10/0x20 [ 20.177397] [ 20.177421] The buggy address belongs to the object at fff00000c522f000 [ 20.177421] which belongs to the cache kmalloc-128 of size 128 [ 20.177529] The buggy address is located 0 bytes inside of [ 20.177529] allocated 120-byte region [fff00000c522f000, fff00000c522f078) [ 20.177603] [ 20.177875] The buggy address belongs to the physical page: [ 20.178001] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10522f [ 20.178090] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.178271] page_type: f5(slab) [ 20.178413] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 20.178472] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 20.178517] page dumped because: kasan: bad access detected [ 20.178559] [ 20.178579] Memory state around the buggy address: [ 20.178613] fff00000c522ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.178976] fff00000c522ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.179064] >fff00000c522f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 20.179141] ^ [ 20.179186] fff00000c522f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.179231] fff00000c522f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.179437] ================================================================== [ 20.180812] ================================================================== [ 20.180868] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0 [ 20.180943] Write of size 1 at addr fff00000c522f078 by task kunit_try_catch/294 [ 20.180996] [ 20.181030] CPU: 1 UID: 0 PID: 294 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT [ 20.181122] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.181150] Hardware name: linux,dummy-virt (DT) [ 20.181184] Call trace: [ 20.181210] show_stack+0x20/0x38 (C) [ 20.181261] dump_stack_lvl+0x8c/0xd0 [ 20.181312] print_report+0x118/0x608 [ 20.181360] kasan_report+0xdc/0x128 [ 20.181409] __asan_report_store1_noabort+0x20/0x30 [ 20.181458] strncpy_from_user+0x270/0x2a0 [ 20.181510] copy_user_test_oob+0x5c0/0xec8 [ 20.181562] kunit_try_run_case+0x170/0x3f0 [ 20.181619] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.181675] kthread+0x328/0x630 [ 20.181720] ret_from_fork+0x10/0x20 [ 20.181771] [ 20.181792] Allocated by task 294: [ 20.182078] kasan_save_stack+0x3c/0x68 [ 20.182295] kasan_save_track+0x20/0x40 [ 20.182339] kasan_save_alloc_info+0x40/0x58 [ 20.183039] __kasan_kmalloc+0xd4/0xd8 [ 20.183133] __kmalloc_noprof+0x198/0x4c8 [ 20.183708] kunit_kmalloc_array+0x34/0x88 [ 20.183846] copy_user_test_oob+0xac/0xec8 [ 20.183889] kunit_try_run_case+0x170/0x3f0 [ 20.183946] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.183995] kthread+0x328/0x630 [ 20.184031] ret_from_fork+0x10/0x20 [ 20.184071] [ 20.184092] The buggy address belongs to the object at fff00000c522f000 [ 20.184092] which belongs to the cache kmalloc-128 of size 128 [ 20.184156] The buggy address is located 0 bytes to the right of [ 20.184156] allocated 120-byte region [fff00000c522f000, fff00000c522f078) [ 20.184225] [ 20.184247] The buggy address belongs to the physical page: [ 20.184591] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10522f [ 20.185122] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.185197] page_type: f5(slab) [ 20.185239] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 20.185594] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 20.185643] page dumped because: kasan: bad access detected [ 20.185679] [ 20.185699] Memory state around the buggy address: [ 20.185733] fff00000c522ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.185779] fff00000c522ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.185836] >fff00000c522f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 20.185877] ^ [ 20.186568] fff00000c522f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.186621] fff00000c522f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.186663] ==================================================================
[ 24.989256] ================================================================== [ 24.990652] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0 [ 24.991167] Write of size 1 at addr ffff8881033b2278 by task kunit_try_catch/312 [ 24.991714] [ 24.993068] CPU: 0 UID: 0 PID: 312 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) [ 24.993168] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.993190] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.993235] Call Trace: [ 24.993288] <TASK> [ 24.993338] dump_stack_lvl+0x73/0xb0 [ 24.993422] print_report+0xd1/0x650 [ 24.993495] ? __virt_addr_valid+0x1db/0x2d0 [ 24.993569] ? strncpy_from_user+0x1a5/0x1d0 [ 24.993609] ? kasan_complete_mode_report_info+0x2a/0x200 [ 24.993643] ? strncpy_from_user+0x1a5/0x1d0 [ 24.993678] kasan_report+0x141/0x180 [ 24.993710] ? strncpy_from_user+0x1a5/0x1d0 [ 24.993750] __asan_report_store1_noabort+0x1b/0x30 [ 24.993786] strncpy_from_user+0x1a5/0x1d0 [ 24.993824] copy_user_test_oob+0x760/0x10f0 [ 24.993891] ? __pfx_copy_user_test_oob+0x10/0x10 [ 24.993926] ? finish_task_switch.isra.0+0x153/0x700 [ 24.993962] ? __switch_to+0x47/0xf50 [ 24.993997] ? __schedule+0x10cc/0x2b60 [ 24.994025] ? __pfx_read_tsc+0x10/0x10 [ 24.994055] ? ktime_get_ts64+0x86/0x230 [ 24.994090] kunit_try_run_case+0x1a5/0x480 [ 24.994127] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.994159] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.994189] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.994245] ? __kthread_parkme+0x82/0x180 [ 24.994287] ? preempt_count_sub+0x50/0x80 [ 24.994320] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.994355] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.994390] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.994424] kthread+0x337/0x6f0 [ 24.994452] ? trace_preempt_on+0x20/0xc0 [ 24.994484] ? __pfx_kthread+0x10/0x10 [ 24.994514] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.994548] ? calculate_sigpending+0x7b/0xa0 [ 24.994587] ? __pfx_kthread+0x10/0x10 [ 24.994618] ret_from_fork+0x116/0x1d0 [ 24.994645] ? __pfx_kthread+0x10/0x10 [ 24.994674] ret_from_fork_asm+0x1a/0x30 [ 24.994717] </TASK> [ 24.994733] [ 25.010311] Allocated by task 312: [ 25.010996] kasan_save_stack+0x45/0x70 [ 25.011607] kasan_save_track+0x18/0x40 [ 25.012184] kasan_save_alloc_info+0x3b/0x50 [ 25.012544] __kasan_kmalloc+0xb7/0xc0 [ 25.012825] __kmalloc_noprof+0x1c9/0x500 [ 25.013139] kunit_kmalloc_array+0x25/0x60 [ 25.013687] copy_user_test_oob+0xab/0x10f0 [ 25.014116] kunit_try_run_case+0x1a5/0x480 [ 25.014859] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.015371] kthread+0x337/0x6f0 [ 25.015934] ret_from_fork+0x116/0x1d0 [ 25.016350] ret_from_fork_asm+0x1a/0x30 [ 25.016756] [ 25.017113] The buggy address belongs to the object at ffff8881033b2200 [ 25.017113] which belongs to the cache kmalloc-128 of size 128 [ 25.018139] The buggy address is located 0 bytes to the right of [ 25.018139] allocated 120-byte region [ffff8881033b2200, ffff8881033b2278) [ 25.019292] [ 25.019454] The buggy address belongs to the physical page: [ 25.019793] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033b2 [ 25.020945] flags: 0x200000000000000(node=0|zone=2) [ 25.021465] page_type: f5(slab) [ 25.021816] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 25.022728] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 25.023407] page dumped because: kasan: bad access detected [ 25.023892] [ 25.024207] Memory state around the buggy address: [ 25.024903] ffff8881033b2100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.025545] ffff8881033b2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.026507] >ffff8881033b2200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 25.026927] ^ [ 25.027486] ffff8881033b2280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.028036] ffff8881033b2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.028540] ================================================================== [ 24.947103] ================================================================== [ 24.948354] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0 [ 24.949148] Write of size 121 at addr ffff8881033b2200 by task kunit_try_catch/312 [ 24.949658] [ 24.949978] CPU: 0 UID: 0 PID: 312 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) [ 24.950109] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.950149] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.950210] Call Trace: [ 24.950287] <TASK> [ 24.950340] dump_stack_lvl+0x73/0xb0 [ 24.950426] print_report+0xd1/0x650 [ 24.950505] ? __virt_addr_valid+0x1db/0x2d0 [ 24.950585] ? strncpy_from_user+0x2e/0x1d0 [ 24.950661] ? kasan_complete_mode_report_info+0x2a/0x200 [ 24.950739] ? strncpy_from_user+0x2e/0x1d0 [ 24.950819] kasan_report+0x141/0x180 [ 24.950919] ? strncpy_from_user+0x2e/0x1d0 [ 24.951010] kasan_check_range+0x10c/0x1c0 [ 24.951089] __kasan_check_write+0x18/0x20 [ 24.951156] strncpy_from_user+0x2e/0x1d0 [ 24.951236] ? __kasan_check_read+0x15/0x20 [ 24.951287] copy_user_test_oob+0x760/0x10f0 [ 24.951329] ? __pfx_copy_user_test_oob+0x10/0x10 [ 24.951363] ? finish_task_switch.isra.0+0x153/0x700 [ 24.951398] ? __switch_to+0x47/0xf50 [ 24.951435] ? __schedule+0x10cc/0x2b60 [ 24.951465] ? __pfx_read_tsc+0x10/0x10 [ 24.951496] ? ktime_get_ts64+0x86/0x230 [ 24.951531] kunit_try_run_case+0x1a5/0x480 [ 24.951579] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.951614] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.951644] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.951681] ? __kthread_parkme+0x82/0x180 [ 24.951710] ? preempt_count_sub+0x50/0x80 [ 24.951742] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.951776] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.951812] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.951874] kthread+0x337/0x6f0 [ 24.951905] ? trace_preempt_on+0x20/0xc0 [ 24.951941] ? __pfx_kthread+0x10/0x10 [ 24.951973] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.952029] ? calculate_sigpending+0x7b/0xa0 [ 24.952069] ? __pfx_kthread+0x10/0x10 [ 24.952101] ret_from_fork+0x116/0x1d0 [ 24.952128] ? __pfx_kthread+0x10/0x10 [ 24.952158] ret_from_fork_asm+0x1a/0x30 [ 24.952201] </TASK> [ 24.952225] [ 24.970199] Allocated by task 312: [ 24.970667] kasan_save_stack+0x45/0x70 [ 24.971181] kasan_save_track+0x18/0x40 [ 24.971624] kasan_save_alloc_info+0x3b/0x50 [ 24.971972] __kasan_kmalloc+0xb7/0xc0 [ 24.972335] __kmalloc_noprof+0x1c9/0x500 [ 24.972745] kunit_kmalloc_array+0x25/0x60 [ 24.973303] copy_user_test_oob+0xab/0x10f0 [ 24.973681] kunit_try_run_case+0x1a5/0x480 [ 24.974007] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.974412] kthread+0x337/0x6f0 [ 24.974843] ret_from_fork+0x116/0x1d0 [ 24.975447] ret_from_fork_asm+0x1a/0x30 [ 24.975984] [ 24.976323] The buggy address belongs to the object at ffff8881033b2200 [ 24.976323] which belongs to the cache kmalloc-128 of size 128 [ 24.977488] The buggy address is located 0 bytes inside of [ 24.977488] allocated 120-byte region [ffff8881033b2200, ffff8881033b2278) [ 24.978585] [ 24.978798] The buggy address belongs to the physical page: [ 24.979375] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033b2 [ 24.979911] flags: 0x200000000000000(node=0|zone=2) [ 24.980576] page_type: f5(slab) [ 24.981030] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 24.981745] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.982479] page dumped because: kasan: bad access detected [ 24.983025] [ 24.983294] Memory state around the buggy address: [ 24.983850] ffff8881033b2100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.984509] ffff8881033b2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.985259] >ffff8881033b2200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 24.985862] ^ [ 24.986549] ffff8881033b2280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.987279] ffff8881033b2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.987794] ==================================================================