Date
Dec. 6, 2024, 3:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.373332] ================================================================== [ 31.374610] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 31.375595] Read of size 18446744073709551614 at addr fff00000c66d2084 by task kunit_try_catch/169 [ 31.376554] [ 31.376970] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 31.378579] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.379074] Hardware name: linux,dummy-virt (DT) [ 31.379747] Call trace: [ 31.380169] show_stack+0x20/0x38 (C) [ 31.380810] dump_stack_lvl+0x8c/0xd0 [ 31.381333] print_report+0x118/0x5e0 [ 31.381993] kasan_report+0xc8/0x118 [ 31.382906] kasan_check_range+0x100/0x1a8 [ 31.383491] __asan_memmove+0x3c/0x98 [ 31.384158] kmalloc_memmove_negative_size+0x154/0x2e0 [ 31.384919] kunit_try_run_case+0x14c/0x3d0 [ 31.385645] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.386693] kthread+0x24c/0x2d0 [ 31.387276] ret_from_fork+0x10/0x20 [ 31.387930] [ 31.388337] Allocated by task 169: [ 31.388912] kasan_save_stack+0x3c/0x68 [ 31.389565] kasan_save_track+0x20/0x40 [ 31.390122] kasan_save_alloc_info+0x40/0x58 [ 31.391141] __kasan_kmalloc+0xd4/0xd8 [ 31.391817] __kmalloc_cache_noprof+0x15c/0x3c0 [ 31.392498] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 31.393098] kunit_try_run_case+0x14c/0x3d0 [ 31.393803] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.395048] kthread+0x24c/0x2d0 [ 31.395619] ret_from_fork+0x10/0x20 [ 31.396288] [ 31.396686] The buggy address belongs to the object at fff00000c66d2080 [ 31.396686] which belongs to the cache kmalloc-64 of size 64 [ 31.398133] The buggy address is located 4 bytes inside of [ 31.398133] 64-byte region [fff00000c66d2080, fff00000c66d20c0) [ 31.399292] [ 31.400294] The buggy address belongs to the physical page: [ 31.401011] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066d2 [ 31.402024] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.403033] page_type: f5(slab) [ 31.403500] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 31.404273] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 31.405231] page dumped because: kasan: bad access detected [ 31.405981] [ 31.406506] Memory state around the buggy address: [ 31.407378] fff00000c66d1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.408222] fff00000c66d2000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 31.409055] >fff00000c66d2080: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 31.409808] ^ [ 31.410290] fff00000c66d2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.411189] fff00000c66d2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.412102] ==================================================================
[ 23.942173] ================================================================== [ 23.943273] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330 [ 23.944753] Read of size 18446744073709551614 at addr ffff888102470984 by task kunit_try_catch/188 [ 23.947672] [ 23.948157] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 23.950048] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.950354] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.952134] Call Trace: [ 23.952401] <TASK> [ 23.952714] dump_stack_lvl+0x73/0xb0 [ 23.954050] print_report+0xd1/0x640 [ 23.954531] ? __virt_addr_valid+0x1db/0x2d0 [ 23.955115] ? kasan_complete_mode_report_info+0x2a/0x200 [ 23.955818] kasan_report+0x102/0x140 [ 23.956252] ? kmalloc_memmove_negative_size+0x172/0x330 [ 23.956804] ? kmalloc_memmove_negative_size+0x172/0x330 [ 23.957404] kasan_check_range+0x10c/0x1c0 [ 23.957907] __asan_memmove+0x27/0x70 [ 23.958638] kmalloc_memmove_negative_size+0x172/0x330 [ 23.959393] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 23.960050] ? __schedule+0xc70/0x27e0 [ 23.960667] ? __pfx_read_tsc+0x10/0x10 [ 23.961175] ? ktime_get_ts64+0x86/0x230 [ 23.961752] kunit_try_run_case+0x1b3/0x490 [ 23.962610] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.963050] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 23.963814] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.964261] ? __kthread_parkme+0x82/0x160 [ 23.964573] ? preempt_count_sub+0x50/0x80 [ 23.965496] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.966045] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.966672] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.967091] kthread+0x257/0x310 [ 23.967489] ? __pfx_kthread+0x10/0x10 [ 23.968339] ret_from_fork+0x41/0x80 [ 23.969028] ? __pfx_kthread+0x10/0x10 [ 23.969920] ret_from_fork_asm+0x1a/0x30 [ 23.970464] </TASK> [ 23.970830] [ 23.971057] Allocated by task 188: [ 23.971384] kasan_save_stack+0x3d/0x60 [ 23.971699] kasan_save_track+0x18/0x40 [ 23.971994] kasan_save_alloc_info+0x3b/0x50 [ 23.972481] __kasan_kmalloc+0xb7/0xc0 [ 23.973370] __kmalloc_cache_noprof+0x184/0x410 [ 23.974126] kmalloc_memmove_negative_size+0xad/0x330 [ 23.974755] kunit_try_run_case+0x1b3/0x490 [ 23.975080] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.975428] kthread+0x257/0x310 [ 23.975902] ret_from_fork+0x41/0x80 [ 23.976885] ret_from_fork_asm+0x1a/0x30 [ 23.977722] [ 23.978218] The buggy address belongs to the object at ffff888102470980 [ 23.978218] which belongs to the cache kmalloc-64 of size 64 [ 23.979925] The buggy address is located 4 bytes inside of [ 23.979925] 64-byte region [ffff888102470980, ffff8881024709c0) [ 23.980701] [ 23.981014] The buggy address belongs to the physical page: [ 23.981949] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102470 [ 23.983392] flags: 0x200000000000000(node=0|zone=2) [ 23.984057] page_type: f5(slab) [ 23.984372] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 23.984863] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 23.987842] page dumped because: kasan: bad access detected [ 23.988593] [ 23.988814] Memory state around the buggy address: [ 23.989380] ffff888102470880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 23.989975] ffff888102470900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 23.990905] >ffff888102470980: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 23.991992] ^ [ 23.992574] ffff888102470a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.993637] ffff888102470a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.994393] ==================================================================