Date
July 1, 2025, 12:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.518327] ================================================================== [ 17.518524] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0 [ 17.518770] Read of size 18446744073709551614 at addr fff00000c58f4884 by task kunit_try_catch/180 [ 17.518854] [ 17.518884] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 17.519137] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.519527] Hardware name: linux,dummy-virt (DT) [ 17.519658] Call trace: [ 17.519772] show_stack+0x20/0x38 (C) [ 17.519891] dump_stack_lvl+0x8c/0xd0 [ 17.520085] print_report+0x118/0x608 [ 17.520160] kasan_report+0xdc/0x128 [ 17.520204] kasan_check_range+0x100/0x1a8 [ 17.520385] __asan_memmove+0x3c/0x98 [ 17.520431] kmalloc_memmove_negative_size+0x154/0x2e0 [ 17.520685] kunit_try_run_case+0x170/0x3f0 [ 17.520733] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.520905] kthread+0x328/0x630 [ 17.520979] ret_from_fork+0x10/0x20 [ 17.522021] [ 17.522057] Allocated by task 180: [ 17.522394] kasan_save_stack+0x3c/0x68 [ 17.522603] kasan_save_track+0x20/0x40 [ 17.522774] kasan_save_alloc_info+0x40/0x58 [ 17.522835] __kasan_kmalloc+0xd4/0xd8 [ 17.522981] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.523356] kmalloc_memmove_negative_size+0xb0/0x2e0 [ 17.523604] kunit_try_run_case+0x170/0x3f0 [ 17.523819] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.523928] kthread+0x328/0x630 [ 17.524023] ret_from_fork+0x10/0x20 [ 17.524060] [ 17.524081] The buggy address belongs to the object at fff00000c58f4880 [ 17.524081] which belongs to the cache kmalloc-64 of size 64 [ 17.524269] The buggy address is located 4 bytes inside of [ 17.524269] 64-byte region [fff00000c58f4880, fff00000c58f48c0) [ 17.524524] [ 17.524676] The buggy address belongs to the physical page: [ 17.524842] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058f4 [ 17.524931] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.524993] page_type: f5(slab) [ 17.525042] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 17.525101] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 17.525142] page dumped because: kasan: bad access detected [ 17.525174] [ 17.525201] Memory state around the buggy address: [ 17.525235] fff00000c58f4780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.525288] fff00000c58f4800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 17.525333] >fff00000c58f4880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 17.525382] ^ [ 17.525419] fff00000c58f4900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.525474] fff00000c58f4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.525516] ==================================================================
[ 11.640164] ================================================================== [ 11.640984] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330 [ 11.641443] Read of size 18446744073709551614 at addr ffff888103908004 by task kunit_try_catch/197 [ 11.641753] [ 11.641841] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.641884] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.641895] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.641914] Call Trace: [ 11.641925] <TASK> [ 11.641938] dump_stack_lvl+0x73/0xb0 [ 11.641965] print_report+0xd1/0x650 [ 11.641987] ? __virt_addr_valid+0x1db/0x2d0 [ 11.642007] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.642047] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.642067] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.642106] kasan_report+0x141/0x180 [ 11.642129] ? kmalloc_memmove_negative_size+0x171/0x330 [ 11.642157] kasan_check_range+0x10c/0x1c0 [ 11.642179] __asan_memmove+0x27/0x70 [ 11.642198] kmalloc_memmove_negative_size+0x171/0x330 [ 11.642221] ? __pfx_kmalloc_memmove_negative_size+0x10/0x10 [ 11.642246] ? __schedule+0x10cc/0x2b60 [ 11.642267] ? __pfx_read_tsc+0x10/0x10 [ 11.642286] ? ktime_get_ts64+0x86/0x230 [ 11.642307] kunit_try_run_case+0x1a5/0x480 [ 11.642329] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.642350] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.642372] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.642393] ? __kthread_parkme+0x82/0x180 [ 11.642412] ? preempt_count_sub+0x50/0x80 [ 11.642434] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.642456] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.642477] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.642499] kthread+0x337/0x6f0 [ 11.642516] ? trace_preempt_on+0x20/0xc0 [ 11.642537] ? __pfx_kthread+0x10/0x10 [ 11.642556] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.642576] ? calculate_sigpending+0x7b/0xa0 [ 11.642597] ? __pfx_kthread+0x10/0x10 [ 11.642617] ret_from_fork+0x116/0x1d0 [ 11.642634] ? __pfx_kthread+0x10/0x10 [ 11.642653] ret_from_fork_asm+0x1a/0x30 [ 11.642682] </TASK> [ 11.642692] [ 11.654903] Allocated by task 197: [ 11.655305] kasan_save_stack+0x45/0x70 [ 11.655654] kasan_save_track+0x18/0x40 [ 11.656000] kasan_save_alloc_info+0x3b/0x50 [ 11.656487] __kasan_kmalloc+0xb7/0xc0 [ 11.656631] __kmalloc_cache_noprof+0x189/0x420 [ 11.656787] kmalloc_memmove_negative_size+0xac/0x330 [ 11.656952] kunit_try_run_case+0x1a5/0x480 [ 11.657278] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.657797] kthread+0x337/0x6f0 [ 11.658103] ret_from_fork+0x116/0x1d0 [ 11.658542] ret_from_fork_asm+0x1a/0x30 [ 11.659006] [ 11.659196] The buggy address belongs to the object at ffff888103908000 [ 11.659196] which belongs to the cache kmalloc-64 of size 64 [ 11.660401] The buggy address is located 4 bytes inside of [ 11.660401] 64-byte region [ffff888103908000, ffff888103908040) [ 11.661478] [ 11.661579] The buggy address belongs to the physical page: [ 11.661751] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103908 [ 11.661991] flags: 0x200000000000000(node=0|zone=2) [ 11.662181] page_type: f5(slab) [ 11.662439] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.662721] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.663095] page dumped because: kasan: bad access detected [ 11.663396] [ 11.663468] Memory state around the buggy address: [ 11.663660] ffff888103907f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.663942] ffff888103907f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.664322] >ffff888103908000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 11.664549] ^ [ 11.664714] ffff888103908080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.665096] ffff888103908100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.665392] ==================================================================