Hay
Date
May 13, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.395580] ==================================================================
[   19.395683] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   19.396040] Read of size 18446744073709551614 at addr fff00000c7785a04 by task kunit_try_catch/180
[   19.396265] 
[   19.396429] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT 
[   19.397182] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.397246] Hardware name: linux,dummy-virt (DT)
[   19.397315] Call trace:
[   19.397345]  show_stack+0x20/0x38 (C)
[   19.397548]  dump_stack_lvl+0x8c/0xd0
[   19.397672]  print_report+0x118/0x608
[   19.397782]  kasan_report+0xdc/0x128
[   19.397926]  kasan_check_range+0x100/0x1a8
[   19.398044]  __asan_memmove+0x3c/0x98
[   19.398111]  kmalloc_memmove_negative_size+0x154/0x2e0
[   19.398221]  kunit_try_run_case+0x170/0x3f0
[   19.398321]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.398408]  kthread+0x328/0x630
[   19.398526]  ret_from_fork+0x10/0x20
[   19.398591] 
[   19.398614] Allocated by task 180:
[   19.398652]  kasan_save_stack+0x3c/0x68
[   19.398726]  kasan_save_track+0x20/0x40
[   19.398789]  kasan_save_alloc_info+0x40/0x58
[   19.398870]  __kasan_kmalloc+0xd4/0xd8
[   19.398917]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.399094]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   19.399158]  kunit_try_run_case+0x170/0x3f0
[   19.399203]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.399271]  kthread+0x328/0x630
[   19.399312]  ret_from_fork+0x10/0x20
[   19.399356] 
[   19.399382] The buggy address belongs to the object at fff00000c7785a00
[   19.399382]  which belongs to the cache kmalloc-64 of size 64
[   19.399649] The buggy address is located 4 bytes inside of
[   19.399649]  64-byte region [fff00000c7785a00, fff00000c7785a40)
[   19.399772] 
[   19.399815] The buggy address belongs to the physical page:
[   19.400012] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107785
[   19.400270] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.400560] page_type: f5(slab)
[   19.400665] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   19.400729] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.400775] page dumped because: kasan: bad access detected
[   19.401053] 
[   19.401097] Memory state around the buggy address:
[   19.401142]  fff00000c7785900: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   19.401418]  fff00000c7785980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.401610] >fff00000c7785a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   19.401656]                    ^
[   19.401690]  fff00000c7785a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.402170]  fff00000c7785b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.402225] ==================================================================

[   11.288803] ==================================================================
[   11.289364] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   11.289748] Read of size 18446744073709551614 at addr ffff8881029cfc04 by task kunit_try_catch/197
[   11.290261] 
[   11.290424] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) 
[   11.290487] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.290499] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.290520] Call Trace:
[   11.290541]  <TASK>
[   11.290557]  dump_stack_lvl+0x73/0xb0
[   11.290587]  print_report+0xd1/0x650
[   11.290609]  ? __virt_addr_valid+0x1db/0x2d0
[   11.290653]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.290677]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.290721]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.290764]  kasan_report+0x141/0x180
[   11.290787]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.290817]  kasan_check_range+0x10c/0x1c0
[   11.290842]  __asan_memmove+0x27/0x70
[   11.290862]  kmalloc_memmove_negative_size+0x171/0x330
[   11.290906]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.290940]  kunit_try_run_case+0x1a5/0x480
[   11.290964]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.290985]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.291009]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.291031]  ? __kthread_parkme+0x82/0x180
[   11.291052]  ? preempt_count_sub+0x50/0x80
[   11.291076]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.291100]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.291122]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.291145]  kthread+0x337/0x6f0
[   11.291166]  ? trace_preempt_on+0x20/0xc0
[   11.291198]  ? __pfx_kthread+0x10/0x10
[   11.291219]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.291239]  ? calculate_sigpending+0x7b/0xa0
[   11.291263]  ? __pfx_kthread+0x10/0x10
[   11.291285]  ret_from_fork+0x116/0x1d0
[   11.291303]  ? __pfx_kthread+0x10/0x10
[   11.291339]  ret_from_fork_asm+0x1a/0x30
[   11.291372]  </TASK>
[   11.291383] 
[   11.302142] Allocated by task 197:
[   11.302341]  kasan_save_stack+0x45/0x70
[   11.302744]  kasan_save_track+0x18/0x40
[   11.302957]  kasan_save_alloc_info+0x3b/0x50
[   11.303286]  __kasan_kmalloc+0xb7/0xc0
[   11.303472]  __kmalloc_cache_noprof+0x189/0x420
[   11.303855]  kmalloc_memmove_negative_size+0xac/0x330
[   11.304087]  kunit_try_run_case+0x1a5/0x480
[   11.304441]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.304913]  kthread+0x337/0x6f0
[   11.305197]  ret_from_fork+0x116/0x1d0
[   11.305514]  ret_from_fork_asm+0x1a/0x30
[   11.305696] 
[   11.305790] The buggy address belongs to the object at ffff8881029cfc00
[   11.305790]  which belongs to the cache kmalloc-64 of size 64
[   11.306682] The buggy address is located 4 bytes inside of
[   11.306682]  64-byte region [ffff8881029cfc00, ffff8881029cfc40)
[   11.307459] 
[   11.307572] The buggy address belongs to the physical page:
[   11.307954] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029cf
[   11.308584] flags: 0x200000000000000(node=0|zone=2)
[   11.308888] page_type: f5(slab)
[   11.309295] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.309805] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.310117] page dumped because: kasan: bad access detected
[   11.310843] 
[   11.310967] Memory state around the buggy address:
[   11.311177]  ffff8881029cfb00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   11.311459]  ffff8881029cfb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.312125] >ffff8881029cfc00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.312812]                    ^
[   11.313046]  ffff8881029cfc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.313355]  ffff8881029cfd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.313929] ==================================================================