Hay
Date
July 4, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.145365] ==================================================================
[   18.145436] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   18.146971] Read of size 18446744073709551614 at addr fff00000c7747404 by task kunit_try_catch/180
[   18.147243] 
[   18.147291] CPU: 0 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.147373] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.147565] Hardware name: linux,dummy-virt (DT)
[   18.147615] Call trace:
[   18.147654]  show_stack+0x20/0x38 (C)
[   18.147768]  dump_stack_lvl+0x8c/0xd0
[   18.147866]  print_report+0x118/0x608
[   18.148029]  kasan_report+0xdc/0x128
[   18.148115]  kasan_check_range+0x100/0x1a8
[   18.148198]  __asan_memmove+0x3c/0x98
[   18.148307]  kmalloc_memmove_negative_size+0x154/0x2e0
[   18.148384]  kunit_try_run_case+0x170/0x3f0
[   18.148470]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.148574]  kthread+0x328/0x630
[   18.148627]  ret_from_fork+0x10/0x20
[   18.148675] 
[   18.148716] Allocated by task 180:
[   18.149030]  kasan_save_stack+0x3c/0x68
[   18.149106]  kasan_save_track+0x20/0x40
[   18.149186]  kasan_save_alloc_info+0x40/0x58
[   18.149255]  __kasan_kmalloc+0xd4/0xd8
[   18.149314]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.149441]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   18.149510]  kunit_try_run_case+0x170/0x3f0
[   18.149588]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.149629]  kthread+0x328/0x630
[   18.150772]  ret_from_fork+0x10/0x20
[   18.150830] 
[   18.150850] The buggy address belongs to the object at fff00000c7747400
[   18.150850]  which belongs to the cache kmalloc-64 of size 64
[   18.151011] The buggy address is located 4 bytes inside of
[   18.151011]  64-byte region [fff00000c7747400, fff00000c7747440)
[   18.151098] 
[   18.151155] The buggy address belongs to the physical page:
[   18.151187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107747
[   18.151242] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.151290] page_type: f5(slab)
[   18.151355] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   18.151414] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   18.151668] page dumped because: kasan: bad access detected
[   18.151886] 
[   18.151921] Memory state around the buggy address:
[   18.152406]  fff00000c7747300: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   18.152846]  fff00000c7747380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   18.155637] >fff00000c7747400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   18.155814]                    ^
[   18.156097]  fff00000c7747480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.157089]  fff00000c7747500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.157701] ==================================================================

[   12.111648] ==================================================================
[   12.112165] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   12.112680] Read of size 18446744073709551614 at addr ffff888102639984 by task kunit_try_catch/197
[   12.113123] 
[   12.113244] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.113292] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.113304] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.113326] Call Trace:
[   12.113342]  <TASK>
[   12.113361]  dump_stack_lvl+0x73/0xb0
[   12.113393]  print_report+0xd1/0x650
[   12.113415]  ? __virt_addr_valid+0x1db/0x2d0
[   12.113437]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.113459]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.113480]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.113521]  kasan_report+0x141/0x180
[   12.113542]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.113570]  kasan_check_range+0x10c/0x1c0
[   12.113591]  __asan_memmove+0x27/0x70
[   12.113610]  kmalloc_memmove_negative_size+0x171/0x330
[   12.113633]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   12.113657]  ? __schedule+0x10cc/0x2b60
[   12.113677]  ? __pfx_read_tsc+0x10/0x10
[   12.113698]  ? ktime_get_ts64+0x86/0x230
[   12.113721]  kunit_try_run_case+0x1a5/0x480
[   12.113746]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.113804]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.113827]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.113848]  ? __kthread_parkme+0x82/0x180
[   12.113868]  ? preempt_count_sub+0x50/0x80
[   12.113890]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.113912]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.113932]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.113954]  kthread+0x337/0x6f0
[   12.113972]  ? trace_preempt_on+0x20/0xc0
[   12.113994]  ? __pfx_kthread+0x10/0x10
[   12.114013]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.114032]  ? calculate_sigpending+0x7b/0xa0
[   12.114055]  ? __pfx_kthread+0x10/0x10
[   12.114076]  ret_from_fork+0x116/0x1d0
[   12.114094]  ? __pfx_kthread+0x10/0x10
[   12.114113]  ret_from_fork_asm+0x1a/0x30
[   12.114143]  </TASK>
[   12.114153] 
[   12.124116] Allocated by task 197:
[   12.124877]  kasan_save_stack+0x45/0x70
[   12.125128]  kasan_save_track+0x18/0x40
[   12.125445]  kasan_save_alloc_info+0x3b/0x50
[   12.125646]  __kasan_kmalloc+0xb7/0xc0
[   12.125824]  __kmalloc_cache_noprof+0x189/0x420
[   12.126037]  kmalloc_memmove_negative_size+0xac/0x330
[   12.126592]  kunit_try_run_case+0x1a5/0x480
[   12.126780]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.127012]  kthread+0x337/0x6f0
[   12.127170]  ret_from_fork+0x116/0x1d0
[   12.127422]  ret_from_fork_asm+0x1a/0x30
[   12.127610] 
[   12.127704] The buggy address belongs to the object at ffff888102639980
[   12.127704]  which belongs to the cache kmalloc-64 of size 64
[   12.128189] The buggy address is located 4 bytes inside of
[   12.128189]  64-byte region [ffff888102639980, ffff8881026399c0)
[   12.128693] 
[   12.128769] The buggy address belongs to the physical page:
[   12.128954] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102639
[   12.129275] flags: 0x200000000000000(node=0|zone=2)
[   12.129512] page_type: f5(slab)
[   12.129684] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.129919] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.130423] page dumped because: kasan: bad access detected
[   12.130687] 
[   12.130783] Memory state around the buggy address:
[   12.131018]  ffff888102639880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.131837]  ffff888102639900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.132170] >ffff888102639980: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.132962]                    ^
[   12.133094]  ffff888102639a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.133826]  ffff888102639a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.134205] ==================================================================