Hay
Date
July 12, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.779757] ==================================================================
[   16.779851] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   16.779909] Read of size 18446744073709551614 at addr fff00000c592f404 by task kunit_try_catch/180
[   16.779989] 
[   16.780017] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.780144] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.780212] Hardware name: linux,dummy-virt (DT)
[   16.780243] Call trace:
[   16.780264]  show_stack+0x20/0x38 (C)
[   16.780310]  dump_stack_lvl+0x8c/0xd0
[   16.780548]  print_report+0x118/0x5d0
[   16.780616]  kasan_report+0xdc/0x128
[   16.780661]  kasan_check_range+0x100/0x1a8
[   16.780739]  __asan_memmove+0x3c/0x98
[   16.780781]  kmalloc_memmove_negative_size+0x154/0x2e0
[   16.780859]  kunit_try_run_case+0x170/0x3f0
[   16.780905]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.780972]  kthread+0x328/0x630
[   16.781020]  ret_from_fork+0x10/0x20
[   16.781311] 
[   16.781363] Allocated by task 180:
[   16.781411]  kasan_save_stack+0x3c/0x68
[   16.781479]  kasan_save_track+0x20/0x40
[   16.781517]  kasan_save_alloc_info+0x40/0x58
[   16.781556]  __kasan_kmalloc+0xd4/0xd8
[   16.781844]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.781929]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   16.782355]  kunit_try_run_case+0x170/0x3f0
[   16.782458]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.782579]  kthread+0x328/0x630
[   16.782626]  ret_from_fork+0x10/0x20
[   16.782683] 
[   16.782958] The buggy address belongs to the object at fff00000c592f400
[   16.782958]  which belongs to the cache kmalloc-64 of size 64
[   16.783030] The buggy address is located 4 bytes inside of
[   16.783030]  64-byte region [fff00000c592f400, fff00000c592f440)
[   16.783092] 
[   16.783132] The buggy address belongs to the physical page:
[   16.783164] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592f
[   16.783262] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.783312] page_type: f5(slab)
[   16.783350] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   16.783632] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   16.783776] page dumped because: kasan: bad access detected
[   16.784157] 
[   16.784247] Memory state around the buggy address:
[   16.784357]  fff00000c592f300: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   16.784466]  fff00000c592f380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.784548] >fff00000c592f400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   16.784588]                    ^
[   16.784616]  fff00000c592f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.784683]  fff00000c592f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.784723] ==================================================================

[   13.163895] ==================================================================
[   13.164742] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   13.165327] Read of size 18446744073709551614 at addr ffff888103a50004 by task kunit_try_catch/197
[   13.165696] 
[   13.165813] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.165857] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.165868] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.165889] Call Trace:
[   13.165901]  <TASK>
[   13.165915]  dump_stack_lvl+0x73/0xb0
[   13.165946]  print_report+0xd1/0x610
[   13.165968]  ? __virt_addr_valid+0x1db/0x2d0
[   13.166228]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.166254]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.166291]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.166339]  kasan_report+0x141/0x180
[   13.166361]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.166392]  kasan_check_range+0x10c/0x1c0
[   13.166415]  __asan_memmove+0x27/0x70
[   13.166434]  kmalloc_memmove_negative_size+0x171/0x330
[   13.166460]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   13.166487]  ? __schedule+0x10cc/0x2b60
[   13.166510]  ? __pfx_read_tsc+0x10/0x10
[   13.166531]  ? ktime_get_ts64+0x86/0x230
[   13.166556]  kunit_try_run_case+0x1a5/0x480
[   13.166581]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.166604]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.166627]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.166651]  ? __kthread_parkme+0x82/0x180
[   13.166671]  ? preempt_count_sub+0x50/0x80
[   13.166695]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.166725]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.166749]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.166774]  kthread+0x337/0x6f0
[   13.166793]  ? trace_preempt_on+0x20/0xc0
[   13.166817]  ? __pfx_kthread+0x10/0x10
[   13.166837]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.166858]  ? calculate_sigpending+0x7b/0xa0
[   13.166882]  ? __pfx_kthread+0x10/0x10
[   13.166903]  ret_from_fork+0x116/0x1d0
[   13.166921]  ? __pfx_kthread+0x10/0x10
[   13.166941]  ret_from_fork_asm+0x1a/0x30
[   13.166971]  </TASK>
[   13.167000] 
[   13.174186] Allocated by task 197:
[   13.174528]  kasan_save_stack+0x45/0x70
[   13.174720]  kasan_save_track+0x18/0x40
[   13.174886]  kasan_save_alloc_info+0x3b/0x50
[   13.175197]  __kasan_kmalloc+0xb7/0xc0
[   13.175353]  __kmalloc_cache_noprof+0x189/0x420
[   13.175574]  kmalloc_memmove_negative_size+0xac/0x330
[   13.175804]  kunit_try_run_case+0x1a5/0x480
[   13.176045]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.176278]  kthread+0x337/0x6f0
[   13.176434]  ret_from_fork+0x116/0x1d0
[   13.176622]  ret_from_fork_asm+0x1a/0x30
[   13.176806] 
[   13.176878] The buggy address belongs to the object at ffff888103a50000
[   13.176878]  which belongs to the cache kmalloc-64 of size 64
[   13.177479] The buggy address is located 4 bytes inside of
[   13.177479]  64-byte region [ffff888103a50000, ffff888103a50040)
[   13.177958] 
[   13.178031] The buggy address belongs to the physical page:
[   13.178204] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a50
[   13.178804] flags: 0x200000000000000(node=0|zone=2)
[   13.179063] page_type: f5(slab)
[   13.179231] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   13.179556] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   13.179850] page dumped because: kasan: bad access detected
[   13.180042] 
[   13.180110] Memory state around the buggy address:
[   13.180273]  ffff888103a4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.180487]  ffff888103a4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.180801] >ffff888103a50000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   13.181112]                    ^
[   13.181454]  ffff888103a50080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.181794]  ffff888103a50100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.182274] ==================================================================