Date
July 22, 2025, 5:13 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 29.300434] ================================================================== [ 29.301223] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x3c/0x70 [ 29.301817] Read of size 121 at addr ffff888104975500 by task kunit_try_catch/333 [ 29.302568] [ 29.302780] CPU: 0 UID: 0 PID: 333 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) [ 29.302841] Tainted: [B]=BAD_PAGE, [N]=TEST [ 29.302856] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 29.302880] Call Trace: [ 29.302894] <TASK> [ 29.302913] dump_stack_lvl+0x73/0xb0 [ 29.302942] print_report+0xd1/0x640 [ 29.302966] ? __virt_addr_valid+0x1db/0x2d0 [ 29.302992] ? _copy_to_user+0x3c/0x70 [ 29.303013] ? kasan_complete_mode_report_info+0x2a/0x200 [ 29.303041] ? _copy_to_user+0x3c/0x70 [ 29.303063] kasan_report+0x141/0x180 [ 29.303087] ? _copy_to_user+0x3c/0x70 [ 29.303113] kasan_check_range+0x10c/0x1c0 [ 29.303139] __kasan_check_read+0x15/0x20 [ 29.303166] _copy_to_user+0x3c/0x70 [ 29.303188] copy_user_test_oob+0x364/0x10f0 [ 29.303216] ? __pfx_copy_user_test_oob+0x10/0x10 [ 29.303240] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 29.303275] ? __pfx_copy_user_test_oob+0x10/0x10 [ 29.303304] kunit_try_run_case+0x1a5/0x480 [ 29.303331] ? __pfx_kunit_try_run_case+0x10/0x10 [ 29.303355] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 29.303383] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 29.303410] ? __kthread_parkme+0x82/0x180 [ 29.303432] ? preempt_count_sub+0x50/0x80 [ 29.303458] ? __pfx_kunit_try_run_case+0x10/0x10 [ 29.303485] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 29.303510] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 29.303536] kthread+0x337/0x6f0 [ 29.303559] ? trace_preempt_on+0x20/0xc0 [ 29.303584] ? __pfx_kthread+0x10/0x10 [ 29.303606] ? _raw_spin_unlock_irq+0x47/0x80 [ 29.303645] ? calculate_sigpending+0x7b/0xa0 [ 29.303671] ? __pfx_kthread+0x10/0x10 [ 29.303694] ret_from_fork+0x116/0x1d0 [ 29.303716] ? __pfx_kthread+0x10/0x10 [ 29.303739] ret_from_fork_asm+0x1a/0x30 [ 29.303771] </TASK> [ 29.303784] [ 29.314887] Allocated by task 333: [ 29.315171] kasan_save_stack+0x45/0x70 [ 29.315454] kasan_save_track+0x18/0x40 [ 29.315788] kasan_save_alloc_info+0x3b/0x50 [ 29.316070] __kasan_kmalloc+0xb7/0xc0 [ 29.316420] __kmalloc_noprof+0x1ca/0x510 [ 29.316878] kunit_kmalloc_array+0x25/0x60 [ 29.317316] copy_user_test_oob+0xab/0x10f0 [ 29.317675] kunit_try_run_case+0x1a5/0x480 [ 29.317828] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 29.318018] kthread+0x337/0x6f0 [ 29.318348] ret_from_fork+0x116/0x1d0 [ 29.318759] ret_from_fork_asm+0x1a/0x30 [ 29.319185] [ 29.319355] The buggy address belongs to the object at ffff888104975500 [ 29.319355] which belongs to the cache kmalloc-128 of size 128 [ 29.320575] The buggy address is located 0 bytes inside of [ 29.320575] allocated 120-byte region [ffff888104975500, ffff888104975578) [ 29.321593] [ 29.321668] The buggy address belongs to the physical page: [ 29.321859] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104975 [ 29.322106] flags: 0x200000000000000(node=0|zone=2) [ 29.322287] page_type: f5(slab) [ 29.322410] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 29.322739] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 29.323286] page dumped because: kasan: bad access detected [ 29.323849] [ 29.324020] Memory state around the buggy address: [ 29.324472] ffff888104975400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.324939] ffff888104975480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.325171] >ffff888104975500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 29.325890] ^ [ 29.326601] ffff888104975580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.327274] ffff888104975600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.327932] ==================================================================