Date
Dec. 6, 2024, 3:11 p.m.
Environment | |
---|---|
qemu-x86_64 |
[ 31.784899] ================================================================== [ 31.785843] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x4a/0x70 [ 31.786663] Read of size 121 at addr ffff888102933c00 by task kunit_try_catch/293 [ 31.787491] [ 31.787958] CPU: 0 UID: 0 PID: 293 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 31.789191] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.789567] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 31.790797] Call Trace: [ 31.791133] <TASK> [ 31.791413] dump_stack_lvl+0x73/0xb0 [ 31.791837] print_report+0xd1/0x640 [ 31.793523] ? __virt_addr_valid+0x1db/0x2d0 [ 31.793851] ? kasan_complete_mode_report_info+0x2a/0x200 [ 31.794537] kasan_report+0x102/0x140 [ 31.795346] ? _copy_to_user+0x4a/0x70 [ 31.795735] ? _copy_to_user+0x4a/0x70 [ 31.795976] kasan_check_range+0x10c/0x1c0 [ 31.796788] __kasan_check_read+0x15/0x20 [ 31.797223] _copy_to_user+0x4a/0x70 [ 31.797605] copy_user_test_oob+0x365/0x10f0 [ 31.798062] ? __pfx_copy_user_test_oob+0x10/0x10 [ 31.798517] ? finish_task_switch.isra.0+0x153/0x700 [ 31.799145] ? __switch_to+0x5d9/0xf60 [ 31.799445] ? __schedule+0xc70/0x27e0 [ 31.799743] ? __pfx_read_tsc+0x10/0x10 [ 31.800355] ? ktime_get_ts64+0x86/0x230 [ 31.801002] kunit_try_run_case+0x1b3/0x490 [ 31.801526] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.801868] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 31.802492] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 31.803297] ? __kthread_parkme+0x82/0x160 [ 31.803996] ? preempt_count_sub+0x50/0x80 [ 31.804735] ? __pfx_kunit_try_run_case+0x10/0x10 [ 31.805631] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 31.806029] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.806704] kthread+0x257/0x310 [ 31.807314] ? __pfx_kthread+0x10/0x10 [ 31.807967] ret_from_fork+0x41/0x80 [ 31.808624] ? __pfx_kthread+0x10/0x10 [ 31.809369] ret_from_fork_asm+0x1a/0x30 [ 31.809924] </TASK> [ 31.810110] [ 31.810228] Allocated by task 293: [ 31.810403] kasan_save_stack+0x3d/0x60 [ 31.810598] kasan_save_track+0x18/0x40 [ 31.810780] kasan_save_alloc_info+0x3b/0x50 [ 31.811061] __kasan_kmalloc+0xb7/0xc0 [ 31.811334] __kmalloc_noprof+0x1c4/0x500 [ 31.811633] kunit_kmalloc_array+0x25/0x60 [ 31.812122] copy_user_test_oob+0xac/0x10f0 [ 31.812606] kunit_try_run_case+0x1b3/0x490 [ 31.813186] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 31.813799] kthread+0x257/0x310 [ 31.814098] ret_from_fork+0x41/0x80 [ 31.814373] ret_from_fork_asm+0x1a/0x30 [ 31.814666] [ 31.815216] The buggy address belongs to the object at ffff888102933c00 [ 31.815216] which belongs to the cache kmalloc-128 of size 128 [ 31.817668] The buggy address is located 0 bytes inside of [ 31.817668] allocated 120-byte region [ffff888102933c00, ffff888102933c78) [ 31.818918] [ 31.819257] The buggy address belongs to the physical page: [ 31.819791] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102933 [ 31.820483] flags: 0x200000000000000(node=0|zone=2) [ 31.821123] page_type: f5(slab) [ 31.821425] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 31.821976] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 31.822754] page dumped because: kasan: bad access detected [ 31.823350] [ 31.823571] Memory state around the buggy address: [ 31.824136] ffff888102933b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.824763] ffff888102933b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.825480] >ffff888102933c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 31.826314] ^ [ 31.826754] ffff888102933c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.827356] ffff888102933d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.828151] ==================================================================