Date
May 12, 2025, 11:48 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.708559] ================================================================== [ 19.708624] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0 [ 19.708691] Write of size 121 at addr fff00000c78d3c00 by task kunit_try_catch/285 [ 19.708744] [ 19.708776] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT [ 19.708861] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.708891] Hardware name: linux,dummy-virt (DT) [ 19.708922] Call trace: [ 19.708946] show_stack+0x20/0x38 (C) [ 19.708997] dump_stack_lvl+0x8c/0xd0 [ 19.709061] print_report+0x118/0x608 [ 19.709114] kasan_report+0xdc/0x128 [ 19.709161] kasan_check_range+0x100/0x1a8 [ 19.709208] __kasan_check_write+0x20/0x30 [ 19.709256] strncpy_from_user+0x3c/0x2a0 [ 19.709303] copy_user_test_oob+0x5c0/0xec8 [ 19.709349] kunit_try_run_case+0x170/0x3f0 [ 19.709396] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.709447] kthread+0x328/0x630 [ 19.709492] ret_from_fork+0x10/0x20 [ 19.709539] [ 19.709561] Allocated by task 285: [ 19.709589] kasan_save_stack+0x3c/0x68 [ 19.709633] kasan_save_track+0x20/0x40 [ 19.709671] kasan_save_alloc_info+0x40/0x58 [ 19.709710] __kasan_kmalloc+0xd4/0xd8 [ 19.709745] __kmalloc_noprof+0x190/0x4d0 [ 19.709783] kunit_kmalloc_array+0x34/0x88 [ 19.709820] copy_user_test_oob+0xac/0xec8 [ 19.709973] kunit_try_run_case+0x170/0x3f0 [ 19.710065] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.710122] kthread+0x328/0x630 [ 19.710171] ret_from_fork+0x10/0x20 [ 19.710226] [ 19.710248] The buggy address belongs to the object at fff00000c78d3c00 [ 19.710248] which belongs to the cache kmalloc-128 of size 128 [ 19.710322] The buggy address is located 0 bytes inside of [ 19.710322] allocated 120-byte region [fff00000c78d3c00, fff00000c78d3c78) [ 19.710894] [ 19.710925] The buggy address belongs to the physical page: [ 19.711141] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078d3 [ 19.711257] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.711371] page_type: f5(slab) [ 19.711487] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 19.711736] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.712066] page dumped because: kasan: bad access detected [ 19.712117] [ 19.712153] Memory state around the buggy address: [ 19.712198] fff00000c78d3b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.712242] fff00000c78d3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.712299] >fff00000c78d3c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 19.712508] ^ [ 19.712557] fff00000c78d3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.712737] fff00000c78d3d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.712796] ================================================================== [ 19.713494] ================================================================== [ 19.713667] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0 [ 19.713732] Write of size 1 at addr fff00000c78d3c78 by task kunit_try_catch/285 [ 19.713795] [ 19.714095] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT [ 19.714457] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.714613] Hardware name: linux,dummy-virt (DT) [ 19.714659] Call trace: [ 19.714747] show_stack+0x20/0x38 (C) [ 19.715014] dump_stack_lvl+0x8c/0xd0 [ 19.715136] print_report+0x118/0x608 [ 19.715398] kasan_report+0xdc/0x128 [ 19.715462] __asan_report_store1_noabort+0x20/0x30 [ 19.715658] strncpy_from_user+0x270/0x2a0 [ 19.715742] copy_user_test_oob+0x5c0/0xec8 [ 19.715950] kunit_try_run_case+0x170/0x3f0 [ 19.716023] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.716137] kthread+0x328/0x630 [ 19.716326] ret_from_fork+0x10/0x20 [ 19.716384] [ 19.716407] Allocated by task 285: [ 19.717077] kasan_save_stack+0x3c/0x68 [ 19.717136] kasan_save_track+0x20/0x40 [ 19.717185] kasan_save_alloc_info+0x40/0x58 [ 19.717229] __kasan_kmalloc+0xd4/0xd8 [ 19.717308] __kmalloc_noprof+0x190/0x4d0 [ 19.717409] kunit_kmalloc_array+0x34/0x88 [ 19.717628] copy_user_test_oob+0xac/0xec8 [ 19.717763] kunit_try_run_case+0x170/0x3f0 [ 19.717808] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.717856] kthread+0x328/0x630 [ 19.718205] ret_from_fork+0x10/0x20 [ 19.718366] [ 19.718427] The buggy address belongs to the object at fff00000c78d3c00 [ 19.718427] which belongs to the cache kmalloc-128 of size 128 [ 19.718577] The buggy address is located 0 bytes to the right of [ 19.718577] allocated 120-byte region [fff00000c78d3c00, fff00000c78d3c78) [ 19.718728] [ 19.718809] The buggy address belongs to the physical page: [ 19.718931] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078d3 [ 19.719092] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.719147] page_type: f5(slab) [ 19.719190] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 19.719242] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.719283] page dumped because: kasan: bad access detected [ 19.719465] [ 19.719493] Memory state around the buggy address: [ 19.719681] fff00000c78d3b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.719758] fff00000c78d3b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.719986] >fff00000c78d3c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 19.720050] ^ [ 19.720101] fff00000c78d3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.720163] fff00000c78d3d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.720205] ==================================================================
[ 22.125181] ================================================================== [ 22.125835] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0 [ 22.127600] Write of size 121 at addr ffff88810232e100 by task kunit_try_catch/302 [ 22.128227] [ 22.128774] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) [ 22.129181] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.129223] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.129282] Call Trace: [ 22.129320] <TASK> [ 22.129355] dump_stack_lvl+0x73/0xb0 [ 22.129414] print_report+0xd1/0x650 [ 22.129453] ? __virt_addr_valid+0x1db/0x2d0 [ 22.129491] ? strncpy_from_user+0x2e/0x1d0 [ 22.129532] ? kasan_complete_mode_report_info+0x2a/0x200 [ 22.129572] ? strncpy_from_user+0x2e/0x1d0 [ 22.129617] kasan_report+0x141/0x180 [ 22.129731] ? strncpy_from_user+0x2e/0x1d0 [ 22.129817] kasan_check_range+0x10c/0x1c0 [ 22.129879] __kasan_check_write+0x18/0x20 [ 22.129920] strncpy_from_user+0x2e/0x1d0 [ 22.129957] ? __kasan_check_read+0x15/0x20 [ 22.129981] copy_user_test_oob+0x760/0x10f0 [ 22.130010] ? __pfx_copy_user_test_oob+0x10/0x10 [ 22.130037] ? finish_task_switch.isra.0+0x153/0x700 [ 22.130063] ? __switch_to+0x47/0xf50 [ 22.130093] ? __schedule+0x10cc/0x2b60 [ 22.130118] ? __pfx_read_tsc+0x10/0x10 [ 22.130144] ? ktime_get_ts64+0x86/0x230 [ 22.130171] kunit_try_run_case+0x1a5/0x480 [ 22.130200] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.130226] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.130252] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.130304] ? __kthread_parkme+0x82/0x180 [ 22.130328] ? preempt_count_sub+0x50/0x80 [ 22.130352] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.130379] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.130405] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.130430] kthread+0x337/0x6f0 [ 22.130453] ? trace_preempt_on+0x20/0xc0 [ 22.130479] ? __pfx_kthread+0x10/0x10 [ 22.130502] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.130525] ? calculate_sigpending+0x7b/0xa0 [ 22.130553] ? __pfx_kthread+0x10/0x10 [ 22.130577] ret_from_fork+0x116/0x1d0 [ 22.130598] ? __pfx_kthread+0x10/0x10 [ 22.130622] ret_from_fork_asm+0x1a/0x30 [ 22.130660] </TASK> [ 22.130685] [ 22.143566] Allocated by task 302: [ 22.144014] kasan_save_stack+0x45/0x70 [ 22.144445] kasan_save_track+0x18/0x40 [ 22.144850] kasan_save_alloc_info+0x3b/0x50 [ 22.145281] __kasan_kmalloc+0xb7/0xc0 [ 22.145682] __kmalloc_noprof+0x1c9/0x500 [ 22.146084] kunit_kmalloc_array+0x25/0x60 [ 22.146304] copy_user_test_oob+0xab/0x10f0 [ 22.146599] kunit_try_run_case+0x1a5/0x480 [ 22.146890] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.147224] kthread+0x337/0x6f0 [ 22.147433] ret_from_fork+0x116/0x1d0 [ 22.147706] ret_from_fork_asm+0x1a/0x30 [ 22.148004] [ 22.148158] The buggy address belongs to the object at ffff88810232e100 [ 22.148158] which belongs to the cache kmalloc-128 of size 128 [ 22.148792] The buggy address is located 0 bytes inside of [ 22.148792] allocated 120-byte region [ffff88810232e100, ffff88810232e178) [ 22.149395] [ 22.149582] The buggy address belongs to the physical page: [ 22.150041] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10232e [ 22.150610] flags: 0x200000000000000(node=0|zone=2) [ 22.150899] page_type: f5(slab) [ 22.151108] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 22.151407] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 22.151977] page dumped because: kasan: bad access detected [ 22.152384] [ 22.152557] Memory state around the buggy address: [ 22.152952] ffff88810232e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.153488] ffff88810232e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.153908] >ffff88810232e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 22.154176] ^ [ 22.154721] ffff88810232e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.155255] ffff88810232e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.155621] ================================================================== [ 22.156940] ================================================================== [ 22.158363] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0 [ 22.158975] Write of size 1 at addr ffff88810232e178 by task kunit_try_catch/302 [ 22.159542] [ 22.159759] CPU: 0 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) [ 22.159863] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.159892] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.159940] Call Trace: [ 22.159985] <TASK> [ 22.160028] dump_stack_lvl+0x73/0xb0 [ 22.160092] print_report+0xd1/0x650 [ 22.160143] ? __virt_addr_valid+0x1db/0x2d0 [ 22.160192] ? strncpy_from_user+0x1a5/0x1d0 [ 22.160235] ? kasan_complete_mode_report_info+0x2a/0x200 [ 22.160295] ? strncpy_from_user+0x1a5/0x1d0 [ 22.160346] kasan_report+0x141/0x180 [ 22.160395] ? strncpy_from_user+0x1a5/0x1d0 [ 22.160435] __asan_report_store1_noabort+0x1b/0x30 [ 22.160473] strncpy_from_user+0x1a5/0x1d0 [ 22.160517] copy_user_test_oob+0x760/0x10f0 [ 22.160572] ? __pfx_copy_user_test_oob+0x10/0x10 [ 22.160620] ? finish_task_switch.isra.0+0x153/0x700 [ 22.160706] ? __switch_to+0x47/0xf50 [ 22.160758] ? __schedule+0x10cc/0x2b60 [ 22.160801] ? __pfx_read_tsc+0x10/0x10 [ 22.160840] ? ktime_get_ts64+0x86/0x230 [ 22.160890] kunit_try_run_case+0x1a5/0x480 [ 22.160947] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.161000] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.161048] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.161077] ? __kthread_parkme+0x82/0x180 [ 22.161102] ? preempt_count_sub+0x50/0x80 [ 22.161128] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.161155] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.161182] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.161207] kthread+0x337/0x6f0 [ 22.161229] ? trace_preempt_on+0x20/0xc0 [ 22.161275] ? __pfx_kthread+0x10/0x10 [ 22.161305] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.161328] ? calculate_sigpending+0x7b/0xa0 [ 22.161356] ? __pfx_kthread+0x10/0x10 [ 22.161380] ret_from_fork+0x116/0x1d0 [ 22.161401] ? __pfx_kthread+0x10/0x10 [ 22.161425] ret_from_fork_asm+0x1a/0x30 [ 22.161459] </TASK> [ 22.161474] [ 22.170950] Allocated by task 302: [ 22.171169] kasan_save_stack+0x45/0x70 [ 22.171398] kasan_save_track+0x18/0x40 [ 22.171752] kasan_save_alloc_info+0x3b/0x50 [ 22.172095] __kasan_kmalloc+0xb7/0xc0 [ 22.172435] __kmalloc_noprof+0x1c9/0x500 [ 22.173502] kunit_kmalloc_array+0x25/0x60 [ 22.173800] copy_user_test_oob+0xab/0x10f0 [ 22.174011] kunit_try_run_case+0x1a5/0x480 [ 22.174338] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.174578] kthread+0x337/0x6f0 [ 22.174757] ret_from_fork+0x116/0x1d0 [ 22.174949] ret_from_fork_asm+0x1a/0x30 [ 22.175153] [ 22.176489] The buggy address belongs to the object at ffff88810232e100 [ 22.176489] which belongs to the cache kmalloc-128 of size 128 [ 22.177554] The buggy address is located 0 bytes to the right of [ 22.177554] allocated 120-byte region [ffff88810232e100, ffff88810232e178) [ 22.178497] [ 22.178833] The buggy address belongs to the physical page: [ 22.179290] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10232e [ 22.179869] flags: 0x200000000000000(node=0|zone=2) [ 22.180218] page_type: f5(slab) [ 22.180523] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 22.180937] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 22.181315] page dumped because: kasan: bad access detected [ 22.181784] [ 22.182103] Memory state around the buggy address: [ 22.182584] ffff88810232e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.182956] ffff88810232e080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.183533] >ffff88810232e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 22.184237] ^ [ 22.184646] ffff88810232e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.185188] ffff88810232e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.185560] ==================================================================