Hay
Date
July 24, 2025, 4:41 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.589493] ==================================================================
[   32.589635] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   32.589722] Read of size 18446744073709551614 at addr fff00000c9a87784 by task kunit_try_catch/211
[   32.589978] 
[   32.590035] CPU: 0 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250724 #1 PREEMPT 
[   32.590494] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.590540] Hardware name: linux,dummy-virt (DT)
[   32.590573] Call trace:
[   32.590616]  show_stack+0x20/0x38 (C)
[   32.590679]  dump_stack_lvl+0x8c/0xd0
[   32.590777]  print_report+0x118/0x5e8
[   32.590842]  kasan_report+0xdc/0x128
[   32.590886]  kasan_check_range+0x100/0x1a8
[   32.591113]  __asan_memmove+0x3c/0x98
[   32.591167]  kmalloc_memmove_negative_size+0x154/0x2e0
[   32.591501]  kunit_try_run_case+0x170/0x3f0
[   32.591571]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.591802]  kthread+0x328/0x630
[   32.591881]  ret_from_fork+0x10/0x20
[   32.592026] 
[   32.592103] Allocated by task 211:
[   32.592137]  kasan_save_stack+0x3c/0x68
[   32.592445]  kasan_save_track+0x20/0x40
[   32.592530]  kasan_save_alloc_info+0x40/0x58
[   32.592690]  __kasan_kmalloc+0xd4/0xd8
[   32.592811]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.593115]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   32.593238]  kunit_try_run_case+0x170/0x3f0
[   32.593322]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.593580]  kthread+0x328/0x630
[   32.593829]  ret_from_fork+0x10/0x20
[   32.593894] 
[   32.593943] The buggy address belongs to the object at fff00000c9a87780
[   32.593943]  which belongs to the cache kmalloc-64 of size 64
[   32.594494] The buggy address is located 4 bytes inside of
[   32.594494]  64-byte region [fff00000c9a87780, fff00000c9a877c0)
[   32.594587] 
[   32.594638] The buggy address belongs to the physical page:
[   32.594725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a87
[   32.594821] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.595088] page_type: f5(slab)
[   32.595269] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   32.595408] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   32.595610] page dumped because: kasan: bad access detected
[   32.595685] 
[   32.595704] Memory state around the buggy address:
[   32.595755]  fff00000c9a87680: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   32.595960]  fff00000c9a87700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   32.596191] >fff00000c9a87780: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   32.596347]                    ^
[   32.596391]  fff00000c9a87800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.596454]  fff00000c9a87880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.596572] ==================================================================

[   27.041219] ==================================================================
[   27.041687] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   27.042337] Read of size 18446744073709551614 at addr ffff88810545ee04 by task kunit_try_catch/228
[   27.043105] 
[   27.043227] CPU: 0 UID: 0 PID: 228 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250724 #1 PREEMPT(voluntary) 
[   27.043292] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   27.043305] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.043328] Call Trace:
[   27.043341]  <TASK>
[   27.043362]  dump_stack_lvl+0x73/0xb0
[   27.043399]  print_report+0xd1/0x640
[   27.043425]  ? __virt_addr_valid+0x1db/0x2d0
[   27.043451]  ? kmalloc_memmove_negative_size+0x171/0x330
[   27.043699]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.043726]  ? kmalloc_memmove_negative_size+0x171/0x330
[   27.043776]  kasan_report+0x141/0x180
[   27.043879]  ? kmalloc_memmove_negative_size+0x171/0x330
[   27.043909]  kasan_check_range+0x10c/0x1c0
[   27.043933]  __asan_memmove+0x27/0x70
[   27.043956]  kmalloc_memmove_negative_size+0x171/0x330
[   27.043981]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   27.044006]  ? __schedule+0x10da/0x2b60
[   27.044032]  ? __pfx_read_tsc+0x10/0x10
[   27.044053]  ? ktime_get_ts64+0x86/0x230
[   27.044078]  kunit_try_run_case+0x1a5/0x480
[   27.044103]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.044125]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.044149]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.044174]  ? __kthread_parkme+0x82/0x180
[   27.044195]  ? preempt_count_sub+0x50/0x80
[   27.044218]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.044241]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.044263]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.044286]  kthread+0x337/0x6f0
[   27.044306]  ? trace_preempt_on+0x20/0xc0
[   27.044329]  ? __pfx_kthread+0x10/0x10
[   27.044349]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.044372]  ? calculate_sigpending+0x7b/0xa0
[   27.044396]  ? __pfx_kthread+0x10/0x10
[   27.044417]  ret_from_fork+0x116/0x1d0
[   27.044436]  ? __pfx_kthread+0x10/0x10
[   27.044456]  ret_from_fork_asm+0x1a/0x30
[   27.044488]  </TASK>
[   27.044500] 
[   27.054595] Allocated by task 228:
[   27.055077]  kasan_save_stack+0x45/0x70
[   27.055298]  kasan_save_track+0x18/0x40
[   27.055481]  kasan_save_alloc_info+0x3b/0x50
[   27.055683]  __kasan_kmalloc+0xb7/0xc0
[   27.056133]  __kmalloc_cache_noprof+0x189/0x420
[   27.056361]  kmalloc_memmove_negative_size+0xac/0x330
[   27.056653]  kunit_try_run_case+0x1a5/0x480
[   27.056821]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.057296]  kthread+0x337/0x6f0
[   27.057446]  ret_from_fork+0x116/0x1d0
[   27.057637]  ret_from_fork_asm+0x1a/0x30
[   27.057807] 
[   27.057902] The buggy address belongs to the object at ffff88810545ee00
[   27.057902]  which belongs to the cache kmalloc-64 of size 64
[   27.058361] The buggy address is located 4 bytes inside of
[   27.058361]  64-byte region [ffff88810545ee00, ffff88810545ee40)
[   27.058787] 
[   27.058880] The buggy address belongs to the physical page:
[   27.059149] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10545e
[   27.060131] flags: 0x200000000000000(node=0|zone=2)
[   27.060434] page_type: f5(slab)
[   27.060586] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   27.060987] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.061542] page dumped because: kasan: bad access detected
[   27.061777] 
[   27.062007] Memory state around the buggy address:
[   27.062331]  ffff88810545ed00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   27.062723]  ffff88810545ed80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.063259] >ffff88810545ee00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   27.063506]                    ^
[   27.064017]  ffff88810545ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.064437]  ffff88810545ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.064693] ==================================================================