Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.044745] ==================================================================
[   17.044813] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   17.044870] Read of size 18446744073709551614 at addr fff00000c57c9904 by task kunit_try_catch/181
[   17.044950] 
[   17.044986] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.045069] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.045095] Hardware name: linux,dummy-virt (DT)
[   17.045125] Call trace:
[   17.045148]  show_stack+0x20/0x38 (C)
[   17.045197]  dump_stack_lvl+0x8c/0xd0
[   17.045245]  print_report+0x118/0x608
[   17.045298]  kasan_report+0xdc/0x128
[   17.045503]  kasan_check_range+0x100/0x1a8
[   17.045617]  __asan_memmove+0x3c/0x98
[   17.045677]  kmalloc_memmove_negative_size+0x154/0x2e0
[   17.045727]  kunit_try_run_case+0x170/0x3f0
[   17.045796]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.045847]  kthread+0x328/0x630
[   17.045888]  ret_from_fork+0x10/0x20
[   17.045935] 
[   17.045954] Allocated by task 181:
[   17.045981]  kasan_save_stack+0x3c/0x68
[   17.046021]  kasan_save_track+0x20/0x40
[   17.046058]  kasan_save_alloc_info+0x40/0x58
[   17.046097]  __kasan_kmalloc+0xd4/0xd8
[   17.046133]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.046172]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   17.046212]  kunit_try_run_case+0x170/0x3f0
[   17.046248]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.046291]  kthread+0x328/0x630
[   17.046322]  ret_from_fork+0x10/0x20
[   17.046357] 
[   17.046376] The buggy address belongs to the object at fff00000c57c9900
[   17.046376]  which belongs to the cache kmalloc-64 of size 64
[   17.046434] The buggy address is located 4 bytes inside of
[   17.046434]  64-byte region [fff00000c57c9900, fff00000c57c9940)
[   17.046492] 
[   17.046511] The buggy address belongs to the physical page:
[   17.046542] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057c9
[   17.046606] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.046653] page_type: f5(slab)
[   17.046692] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   17.046741] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.046780] page dumped because: kasan: bad access detected
[   17.046811] 
[   17.046828] Memory state around the buggy address:
[   17.046860]  fff00000c57c9800: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   17.046904]  fff00000c57c9880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.046947] >fff00000c57c9900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.046985]                    ^
[   17.047011]  fff00000c57c9980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.047054]  fff00000c57c9a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.047092] ==================================================================

[   11.793098] ==================================================================
[   11.793836] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   11.794392] Read of size 18446744073709551614 at addr ffff8881033ab404 by task kunit_try_catch/197
[   11.795119] 
[   11.795249] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.795300] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.795312] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.795335] Call Trace:
[   11.795348]  <TASK>
[   11.795369]  dump_stack_lvl+0x73/0xb0
[   11.795402]  print_report+0xd1/0x650
[   11.795424]  ? __virt_addr_valid+0x1db/0x2d0
[   11.795448]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.795471]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.795534]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.795581]  kasan_report+0x141/0x180
[   11.795604]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.795631]  kasan_check_range+0x10c/0x1c0
[   11.795653]  __asan_memmove+0x27/0x70
[   11.795672]  kmalloc_memmove_negative_size+0x171/0x330
[   11.795695]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.795719]  ? __schedule+0x10cc/0x2b60
[   11.795741]  ? __pfx_read_tsc+0x10/0x10
[   11.795763]  ? ktime_get_ts64+0x86/0x230
[   11.795788]  kunit_try_run_case+0x1a5/0x480
[   11.795813]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.795834]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.795856]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.795877]  ? __kthread_parkme+0x82/0x180
[   11.795898]  ? preempt_count_sub+0x50/0x80
[   11.795921]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.795943]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.795964]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.795986]  kthread+0x337/0x6f0
[   11.796004]  ? trace_preempt_on+0x20/0xc0
[   11.796039]  ? __pfx_kthread+0x10/0x10
[   11.796058]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.796078]  ? calculate_sigpending+0x7b/0xa0
[   11.796101]  ? __pfx_kthread+0x10/0x10
[   11.796121]  ret_from_fork+0x116/0x1d0
[   11.796138]  ? __pfx_kthread+0x10/0x10
[   11.796165]  ret_from_fork_asm+0x1a/0x30
[   11.796195]  </TASK>
[   11.796206] 
[   11.807065] Allocated by task 197:
[   11.807204]  kasan_save_stack+0x45/0x70
[   11.807411]  kasan_save_track+0x18/0x40
[   11.807635]  kasan_save_alloc_info+0x3b/0x50
[   11.807886]  __kasan_kmalloc+0xb7/0xc0
[   11.808226]  __kmalloc_cache_noprof+0x189/0x420
[   11.808463]  kmalloc_memmove_negative_size+0xac/0x330
[   11.808754]  kunit_try_run_case+0x1a5/0x480
[   11.808979]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.809171]  kthread+0x337/0x6f0
[   11.809290]  ret_from_fork+0x116/0x1d0
[   11.809437]  ret_from_fork_asm+0x1a/0x30
[   11.809635] 
[   11.809864] The buggy address belongs to the object at ffff8881033ab400
[   11.809864]  which belongs to the cache kmalloc-64 of size 64
[   11.810414] The buggy address is located 4 bytes inside of
[   11.810414]  64-byte region [ffff8881033ab400, ffff8881033ab440)
[   11.811097] 
[   11.811181] The buggy address belongs to the physical page:
[   11.811406] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033ab
[   11.811892] flags: 0x200000000000000(node=0|zone=2)
[   11.812072] page_type: f5(slab)
[   11.812404] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.812811] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.813137] page dumped because: kasan: bad access detected
[   11.813370] 
[   11.813459] Memory state around the buggy address:
[   11.814239]  ffff8881033ab300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.814493]  ffff8881033ab380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.815146] >ffff8881033ab400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.815444]                    ^
[   11.815597]  ffff8881033ab480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.815946]  ffff8881033ab500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.816257] ==================================================================