Date
June 2, 2025, 2:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.092637] ================================================================== [ 20.093393] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x15c/0x2f8 [ 20.094222] Read of size 18446744073709551614 at addr fff00000c6491684 by task kunit_try_catch/167 [ 20.094857] [ 20.095130] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 20.095406] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.095999] Hardware name: linux,dummy-virt (DT) [ 20.096208] Call trace: [ 20.096289] dump_backtrace+0x9c/0x128 [ 20.096400] show_stack+0x20/0x38 [ 20.096471] dump_stack_lvl+0x8c/0xd0 [ 20.096554] print_report+0x118/0x5f0 [ 20.096626] kasan_report+0xdc/0x128 [ 20.096667] kasan_check_range+0x100/0x1a8 [ 20.096709] __asan_memmove+0x3c/0x98 [ 20.096750] kmalloc_memmove_negative_size+0x15c/0x2f8 [ 20.096798] kunit_try_run_case+0x170/0x3f0 [ 20.096842] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.096890] kthread+0x24c/0x2d0 [ 20.096931] ret_from_fork+0x10/0x20 [ 20.096979] [ 20.102062] Allocated by task 167: [ 20.102310] kasan_save_stack+0x3c/0x68 [ 20.102666] kasan_save_track+0x20/0x40 [ 20.103000] kasan_save_alloc_info+0x40/0x58 [ 20.104181] __kasan_kmalloc+0xd4/0xd8 [ 20.105121] __kmalloc_cache_noprof+0x154/0x320 [ 20.105674] kmalloc_memmove_negative_size+0xb8/0x2f8 [ 20.106291] kunit_try_run_case+0x170/0x3f0 [ 20.106603] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.107488] kthread+0x24c/0x2d0 [ 20.108036] ret_from_fork+0x10/0x20 [ 20.108602] [ 20.108872] The buggy address belongs to the object at fff00000c6491680 [ 20.108872] which belongs to the cache kmalloc-64 of size 64 [ 20.109702] The buggy address is located 4 bytes inside of [ 20.109702] 64-byte region [fff00000c6491680, fff00000c64916c0) [ 20.110845] [ 20.111251] The buggy address belongs to the physical page: [ 20.111812] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106491 [ 20.112434] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.112940] page_type: f5(slab) [ 20.113765] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 20.114397] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 20.115672] page dumped because: kasan: bad access detected [ 20.115982] [ 20.116157] Memory state around the buggy address: [ 20.116700] fff00000c6491580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 20.117590] fff00000c6491600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 20.118377] >fff00000c6491680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 20.118975] ^ [ 20.119562] fff00000c6491700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.119925] fff00000c6491780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.120638] ==================================================================
[ 12.261688] ================================================================== [ 12.262152] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330 [ 12.262721] Read of size 18446744073709551614 at addr ffff88810261a504 by task kunit_try_catch/185 [ 12.263232] [ 12.263767] CPU: 0 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.12.32-rc1 #1 [ 12.264150] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.264187] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.264225] Call Trace: [ 12.264251] <TASK> [ 12.264284] dump_stack_lvl+0x73/0xb0 [ 12.264345] print_report+0xd1/0x640 [ 12.264392] ? __virt_addr_valid+0x1db/0x2d0 [ 12.264437] ? kmalloc_memmove_negative_size+0x172/0x330 [ 12.264477] ? kasan_complete_mode_report_info+0x2a/0x200 [ 12.264513] ? kmalloc_memmove_negative_size+0x172/0x330 [ 12.264568] kasan_report+0x140/0x180 [ 12.264592] ? kmalloc_memmove_negative_size+0x172/0x330 [ 12.264618] kasan_check_range+0x10c/0x1c0 [ 12.264638] __asan_memmove+0x27/0x70 [ 12.264677] kmalloc_memmove_negative_size+0x172/0x330 [ 12.264703] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 12.264725] ? __schedule+0xc49/0x27a0 [ 12.264745] ? __pfx_read_tsc+0x10/0x10 [ 12.264764] ? ktime_get_ts64+0x84/0x230 [ 12.264791] kunit_try_run_case+0x1a6/0x480 [ 12.264812] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.264831] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 12.264851] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.264874] ? __kthread_parkme+0x82/0x160 [ 12.264893] ? preempt_count_sub+0x50/0x80 [ 12.264916] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.264934] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.264958] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.264982] kthread+0x257/0x310 [ 12.265000] ? __pfx_kthread+0x10/0x10 [ 12.265017] ret_from_fork+0x41/0x80 [ 12.265036] ? __pfx_kthread+0x10/0x10 [ 12.265057] ret_from_fork_asm+0x1a/0x30 [ 12.265142] </TASK> [ 12.265164] [ 12.274781] Allocated by task 185: [ 12.275193] kasan_save_stack+0x45/0x70 [ 12.275484] kasan_save_track+0x18/0x40 [ 12.275754] kasan_save_alloc_info+0x3b/0x50 [ 12.276036] __kasan_kmalloc+0xb7/0xc0 [ 12.276343] __kmalloc_cache_noprof+0x168/0x350 [ 12.276534] kmalloc_memmove_negative_size+0xad/0x330 [ 12.276820] kunit_try_run_case+0x1a6/0x480 [ 12.277719] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.278295] kthread+0x257/0x310 [ 12.278546] ret_from_fork+0x41/0x80 [ 12.278830] ret_from_fork_asm+0x1a/0x30 [ 12.279281] [ 12.279466] The buggy address belongs to the object at ffff88810261a500 [ 12.279466] which belongs to the cache kmalloc-64 of size 64 [ 12.279918] The buggy address is located 4 bytes inside of [ 12.279918] 64-byte region [ffff88810261a500, ffff88810261a540) [ 12.280783] [ 12.280961] The buggy address belongs to the physical page: [ 12.281419] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10261a [ 12.281753] flags: 0x200000000000000(node=0|zone=2) [ 12.282554] page_type: f5(slab) [ 12.282873] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.283374] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 [ 12.283981] page dumped because: kasan: bad access detected [ 12.284493] [ 12.284634] Memory state around the buggy address: [ 12.284948] ffff88810261a400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.285414] ffff88810261a480: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.285827] >ffff88810261a500: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 12.286245] ^ [ 12.286500] ffff88810261a580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.287441] ffff88810261a600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.287972] ==================================================================