Date
June 23, 2025, 1:39 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 24.149363] ================================================================== [ 24.149929] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x4a/0x70 [ 24.150471] Read of size 121 at addr ffff88810a090200 by task kunit_try_catch/306 [ 24.151158] [ 24.151444] CPU: 1 UID: 0 PID: 306 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT(voluntary) [ 24.151573] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.151630] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.151689] Call Trace: [ 24.151740] <TASK> [ 24.151785] dump_stack_lvl+0x73/0xb0 [ 24.151866] print_report+0xd1/0x650 [ 24.151991] ? __virt_addr_valid+0x1db/0x2d0 [ 24.152072] ? _copy_to_user+0x4a/0x70 [ 24.152143] ? kasan_complete_mode_report_info+0x2a/0x200 [ 24.152220] ? _copy_to_user+0x4a/0x70 [ 24.152331] kasan_report+0x141/0x180 [ 24.152418] ? _copy_to_user+0x4a/0x70 [ 24.152505] kasan_check_range+0x10c/0x1c0 [ 24.152578] __kasan_check_read+0x15/0x20 [ 24.152639] _copy_to_user+0x4a/0x70 [ 24.152673] copy_user_test_oob+0x364/0x10f0 [ 24.152709] ? __pfx_copy_user_test_oob+0x10/0x10 [ 24.152740] ? finish_task_switch.isra.0+0x153/0x700 [ 24.152775] ? __switch_to+0x5d9/0xf60 [ 24.152805] ? dequeue_task_fair+0x156/0x4e0 [ 24.152840] ? __schedule+0x10cc/0x2b60 [ 24.152874] ? __pfx_read_tsc+0x10/0x10 [ 24.152903] ? ktime_get_ts64+0x86/0x230 [ 24.152940] kunit_try_run_case+0x1a5/0x480 [ 24.152977] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.153013] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 24.153049] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.153087] ? __kthread_parkme+0x82/0x180 [ 24.153120] ? preempt_count_sub+0x50/0x80 [ 24.153157] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.153193] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.153266] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.153308] kthread+0x337/0x6f0 [ 24.153336] ? trace_preempt_on+0x20/0xc0 [ 24.153372] ? __pfx_kthread+0x10/0x10 [ 24.153399] ? _raw_spin_unlock_irq+0x47/0x80 [ 24.153433] ? calculate_sigpending+0x7b/0xa0 [ 24.153465] ? __pfx_kthread+0x10/0x10 [ 24.153492] ret_from_fork+0x41/0x80 [ 24.153523] ? __pfx_kthread+0x10/0x10 [ 24.153550] ret_from_fork_asm+0x1a/0x30 [ 24.153594] </TASK> [ 24.153633] [ 24.171462] Allocated by task 306: [ 24.171816] kasan_save_stack+0x45/0x70 [ 24.172148] kasan_save_track+0x18/0x40 [ 24.172505] kasan_save_alloc_info+0x3b/0x50 [ 24.172955] __kasan_kmalloc+0xb7/0xc0 [ 24.173366] __kmalloc_noprof+0x1c9/0x500 [ 24.173859] kunit_kmalloc_array+0x25/0x60 [ 24.174190] copy_user_test_oob+0xab/0x10f0 [ 24.174558] kunit_try_run_case+0x1a5/0x480 [ 24.174905] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.175340] kthread+0x337/0x6f0 [ 24.175832] ret_from_fork+0x41/0x80 [ 24.176415] ret_from_fork_asm+0x1a/0x30 [ 24.176975] [ 24.177310] The buggy address belongs to the object at ffff88810a090200 [ 24.177310] which belongs to the cache kmalloc-128 of size 128 [ 24.178409] The buggy address is located 0 bytes inside of [ 24.178409] allocated 120-byte region [ffff88810a090200, ffff88810a090278) [ 24.179539] [ 24.179850] The buggy address belongs to the physical page: [ 24.180452] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a090 [ 24.181287] flags: 0x200000000000000(node=0|zone=2) [ 24.181798] page_type: f5(slab) [ 24.182296] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 24.183032] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 24.183644] page dumped because: kasan: bad access detected [ 24.184005] [ 24.184308] Memory state around the buggy address: [ 24.184876] ffff88810a090100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.185591] ffff88810a090180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.186305] >ffff88810a090200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 24.186909] ^ [ 24.188176] ffff88810a090280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.189006] ffff88810a090300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.189589] ==================================================================