Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.365942] ==================================================================
[   19.366025] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   19.366089] Read of size 18446744073709551614 at addr fff00000c5709404 by task kunit_try_catch/180
[   19.366181] 
[   19.366216] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.366296] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.366330] Hardware name: linux,dummy-virt (DT)
[   19.366369] Call trace:
[   19.366392]  show_stack+0x20/0x38 (C)
[   19.366446]  dump_stack_lvl+0x8c/0xd0
[   19.366492]  print_report+0x118/0x608
[   19.366536]  kasan_report+0xdc/0x128
[   19.366588]  kasan_check_range+0x100/0x1a8
[   19.366634]  __asan_memmove+0x3c/0x98
[   19.366682]  kmalloc_memmove_negative_size+0x154/0x2e0
[   19.366867]  kunit_try_run_case+0x170/0x3f0
[   19.366920]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.367353]  kthread+0x328/0x630
[   19.369542]  ret_from_fork+0x10/0x20
[   19.369889] 
[   19.369944] Allocated by task 180:
[   19.370080]  kasan_save_stack+0x3c/0x68
[   19.370194]  kasan_save_track+0x20/0x40
[   19.370336]  kasan_save_alloc_info+0x40/0x58
[   19.370462]  __kasan_kmalloc+0xd4/0xd8
[   19.370537]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.370683]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   19.370813]  kunit_try_run_case+0x170/0x3f0
[   19.371059]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.371269]  kthread+0x328/0x630
[   19.371334]  ret_from_fork+0x10/0x20
[   19.371456] 
[   19.371566] The buggy address belongs to the object at fff00000c5709400
[   19.371566]  which belongs to the cache kmalloc-64 of size 64
[   19.371767] The buggy address is located 4 bytes inside of
[   19.371767]  64-byte region [fff00000c5709400, fff00000c5709440)
[   19.371936] 
[   19.372015] The buggy address belongs to the physical page:
[   19.372124] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105709
[   19.372182] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.372233] page_type: f5(slab)
[   19.372384] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   19.372632] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.372745] page dumped because: kasan: bad access detected
[   19.372845] 
[   19.372865] Memory state around the buggy address:
[   19.372916]  fff00000c5709300: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   19.373253]  fff00000c5709380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.373342] >fff00000c5709400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   19.373492]                    ^
[   19.373521]  fff00000c5709480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.374039]  fff00000c5709500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.374112] ==================================================================

[   13.108931] ==================================================================
[   13.109669] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   13.110057] Read of size 18446744073709551614 at addr ffff888102b00d84 by task kunit_try_catch/197
[   13.110913] 
[   13.111211] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.111273] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.111286] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.111307] Call Trace:
[   13.111318]  <TASK>
[   13.111332]  dump_stack_lvl+0x73/0xb0
[   13.111361]  print_report+0xd1/0x650
[   13.111382]  ? __virt_addr_valid+0x1db/0x2d0
[   13.111402]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.111425]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.111449]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.111493]  kasan_report+0x141/0x180
[   13.111515]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.111543]  kasan_check_range+0x10c/0x1c0
[   13.111565]  __asan_memmove+0x27/0x70
[   13.111584]  kmalloc_memmove_negative_size+0x171/0x330
[   13.111608]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   13.111632]  ? __schedule+0x10cc/0x2b60
[   13.111653]  ? __pfx_read_tsc+0x10/0x10
[   13.111673]  ? ktime_get_ts64+0x86/0x230
[   13.111696]  kunit_try_run_case+0x1a5/0x480
[   13.111719]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.111740]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.111762]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.111785]  ? __kthread_parkme+0x82/0x180
[   13.111804]  ? preempt_count_sub+0x50/0x80
[   13.111826]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.111848]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.111870]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.111892]  kthread+0x337/0x6f0
[   13.111910]  ? trace_preempt_on+0x20/0xc0
[   13.111931]  ? __pfx_kthread+0x10/0x10
[   13.111951]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.111970]  ? calculate_sigpending+0x7b/0xa0
[   13.111993]  ? __pfx_kthread+0x10/0x10
[   13.112013]  ret_from_fork+0x116/0x1d0
[   13.112030]  ? __pfx_kthread+0x10/0x10
[   13.112129]  ret_from_fork_asm+0x1a/0x30
[   13.112164]  </TASK>
[   13.112176] 
[   13.122148] Allocated by task 197:
[   13.122421]  kasan_save_stack+0x45/0x70
[   13.122717]  kasan_save_track+0x18/0x40
[   13.122896]  kasan_save_alloc_info+0x3b/0x50
[   13.123146]  __kasan_kmalloc+0xb7/0xc0
[   13.123374]  __kmalloc_cache_noprof+0x189/0x420
[   13.123738]  kmalloc_memmove_negative_size+0xac/0x330
[   13.124033]  kunit_try_run_case+0x1a5/0x480
[   13.124194]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.124569]  kthread+0x337/0x6f0
[   13.124846]  ret_from_fork+0x116/0x1d0
[   13.125019]  ret_from_fork_asm+0x1a/0x30
[   13.125203] 
[   13.125300] The buggy address belongs to the object at ffff888102b00d80
[   13.125300]  which belongs to the cache kmalloc-64 of size 64
[   13.126074] The buggy address is located 4 bytes inside of
[   13.126074]  64-byte region [ffff888102b00d80, ffff888102b00dc0)
[   13.126765] 
[   13.126896] The buggy address belongs to the physical page:
[   13.127187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b00
[   13.127766] flags: 0x200000000000000(node=0|zone=2)
[   13.128056] page_type: f5(slab)
[   13.128188] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   13.128561] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   13.128947] page dumped because: kasan: bad access detected
[   13.129364] 
[   13.129656] Memory state around the buggy address:
[   13.129833]  ffff888102b00c80: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   13.130182]  ffff888102b00d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.130632] >ffff888102b00d80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   13.131050]                    ^
[   13.131387]  ffff888102b00e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.131859]  ffff888102b00e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.132305] ==================================================================