Hay
Date
July 10, 2025, 9:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.537434] ==================================================================
[   29.537508] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   29.537846] Read of size 18446744073709551614 at addr fff00000c99b0684 by task kunit_try_catch/211
[   29.538051] 
[   29.538318] CPU: 0 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT 
[   29.538757] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.538788] Hardware name: linux,dummy-virt (DT)
[   29.538821] Call trace:
[   29.538844]  show_stack+0x20/0x38 (C)
[   29.538898]  dump_stack_lvl+0x8c/0xd0
[   29.538947]  print_report+0x118/0x5d0
[   29.538989]  kasan_report+0xdc/0x128
[   29.539377]  kasan_check_range+0x100/0x1a8
[   29.539424]  __asan_memmove+0x3c/0x98
[   29.539710]  kmalloc_memmove_negative_size+0x154/0x2e0
[   29.539779]  kunit_try_run_case+0x170/0x3f0
[   29.540066]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.540415]  kthread+0x328/0x630
[   29.540467]  ret_from_fork+0x10/0x20
[   29.540516] 
[   29.540535] Allocated by task 211:
[   29.540983]  kasan_save_stack+0x3c/0x68
[   29.541097]  kasan_save_track+0x20/0x40
[   29.541153]  kasan_save_alloc_info+0x40/0x58
[   29.541469]  __kasan_kmalloc+0xd4/0xd8
[   29.541515]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.541555]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   29.542006]  kunit_try_run_case+0x170/0x3f0
[   29.542367]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.542624]  kthread+0x328/0x630
[   29.542798]  ret_from_fork+0x10/0x20
[   29.542836] 
[   29.542857] The buggy address belongs to the object at fff00000c99b0680
[   29.542857]  which belongs to the cache kmalloc-64 of size 64
[   29.542918] The buggy address is located 4 bytes inside of
[   29.542918]  64-byte region [fff00000c99b0680, fff00000c99b06c0)
[   29.542981] 
[   29.543001] The buggy address belongs to the physical page:
[   29.543034] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1099b0
[   29.543172] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.543228] page_type: f5(slab)
[   29.543582] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   29.543853] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   29.544332] page dumped because: kasan: bad access detected
[   29.544366] 
[   29.544385] Memory state around the buggy address:
[   29.544419]  fff00000c99b0580: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   29.544464]  fff00000c99b0600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   29.544508] >fff00000c99b0680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   29.544551]                    ^
[   29.544578]  fff00000c99b0700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.544622]  fff00000c99b0780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.544661] ==================================================================

[   25.229891] ==================================================================
[   25.230333] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   25.230661] Read of size 18446744073709551614 at addr ffff888105847884 by task kunit_try_catch/228
[   25.231088] 
[   25.231200] CPU: 0 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) 
[   25.231249] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.231261] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.231282] Call Trace:
[   25.231294]  <TASK>
[   25.231312]  dump_stack_lvl+0x73/0xb0
[   25.231339]  print_report+0xd1/0x610
[   25.231361]  ? __virt_addr_valid+0x1db/0x2d0
[   25.231385]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.231409]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.231434]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.231611]  kasan_report+0x141/0x180
[   25.231643]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.231672]  kasan_check_range+0x10c/0x1c0
[   25.231695]  __asan_memmove+0x27/0x70
[   25.231729]  kmalloc_memmove_negative_size+0x171/0x330
[   25.231754]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   25.231836]  ? __schedule+0x10cc/0x2b60
[   25.231864]  ? __pfx_read_tsc+0x10/0x10
[   25.231886]  ? ktime_get_ts64+0x86/0x230
[   25.231910]  kunit_try_run_case+0x1a5/0x480
[   25.231932]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.231952]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.231974]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.231997]  ? __kthread_parkme+0x82/0x180
[   25.232017]  ? preempt_count_sub+0x50/0x80
[   25.232041]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.232062]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.232086]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.232110]  kthread+0x337/0x6f0
[   25.232130]  ? trace_preempt_on+0x20/0xc0
[   25.232152]  ? __pfx_kthread+0x10/0x10
[   25.232174]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.232195]  ? calculate_sigpending+0x7b/0xa0
[   25.232218]  ? __pfx_kthread+0x10/0x10
[   25.232239]  ret_from_fork+0x116/0x1d0
[   25.232259]  ? __pfx_kthread+0x10/0x10
[   25.232279]  ret_from_fork_asm+0x1a/0x30
[   25.232310]  </TASK>
[   25.232322] 
[   25.241507] Allocated by task 228:
[   25.241723]  kasan_save_stack+0x45/0x70
[   25.243264]  kasan_save_track+0x18/0x40
[   25.243499]  kasan_save_alloc_info+0x3b/0x50
[   25.243664]  __kasan_kmalloc+0xb7/0xc0
[   25.243871]  __kmalloc_cache_noprof+0x189/0x420
[   25.244105]  kmalloc_memmove_negative_size+0xac/0x330
[   25.244342]  kunit_try_run_case+0x1a5/0x480
[   25.244533]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.246288]  kthread+0x337/0x6f0
[   25.246765]  ret_from_fork+0x116/0x1d0
[   25.247292]  ret_from_fork_asm+0x1a/0x30
[   25.248260] 
[   25.248631] The buggy address belongs to the object at ffff888105847880
[   25.248631]  which belongs to the cache kmalloc-64 of size 64
[   25.249738] The buggy address is located 4 bytes inside of
[   25.249738]  64-byte region [ffff888105847880, ffff8881058478c0)
[   25.250757] 
[   25.250938] The buggy address belongs to the physical page:
[   25.251289] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105847
[   25.251745] flags: 0x200000000000000(node=0|zone=2)
[   25.252236] page_type: f5(slab)
[   25.252441] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   25.252988] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   25.253337] page dumped because: kasan: bad access detected
[   25.253739] 
[   25.253912] Memory state around the buggy address:
[   25.254303]  ffff888105847780: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   25.254822]  ffff888105847800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   25.255145] >ffff888105847880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   25.255422]                    ^
[   25.255613]  ffff888105847900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.256012]  ffff888105847980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.256276] ==================================================================