Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   27.707334] ==================================================================
[   27.708064] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   27.708253] Read of size 18446744073709551614 at addr fff00000c7770c04 by task kunit_try_catch/182
[   27.708486] 
[   27.708581] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   27.708803] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.708866] Hardware name: linux,dummy-virt (DT)
[   27.708944] Call trace:
[   27.709009]  show_stack+0x20/0x38 (C)
[   27.709155]  dump_stack_lvl+0x8c/0xd0
[   27.709294]  print_report+0x118/0x608
[   27.709424]  kasan_report+0xdc/0x128
[   27.710282]  kasan_check_range+0x100/0x1a8
[   27.710916]  __asan_memmove+0x3c/0x98
[   27.710998]  kmalloc_memmove_negative_size+0x154/0x2e0
[   27.711118]  kunit_try_run_case+0x170/0x3f0
[   27.711306]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.711557]  kthread+0x328/0x630
[   27.711741]  ret_from_fork+0x10/0x20
[   27.711894] 
[   27.711941] Allocated by task 182:
[   27.712002]  kasan_save_stack+0x3c/0x68
[   27.712104]  kasan_save_track+0x20/0x40
[   27.712250]  kasan_save_alloc_info+0x40/0x58
[   27.712358]  __kasan_kmalloc+0xd4/0xd8
[   27.712497]  __kmalloc_cache_noprof+0x15c/0x3c0
[   27.712647]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   27.712764]  kunit_try_run_case+0x170/0x3f0
[   27.712876]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.712980]  kthread+0x328/0x630
[   27.713060]  ret_from_fork+0x10/0x20
[   27.713148] 
[   27.713201] The buggy address belongs to the object at fff00000c7770c00
[   27.713201]  which belongs to the cache kmalloc-64 of size 64
[   27.713367] The buggy address is located 4 bytes inside of
[   27.713367]  64-byte region [fff00000c7770c00, fff00000c7770c40)
[   27.713569] 
[   27.713621] The buggy address belongs to the physical page:
[   27.713706] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107770
[   27.714154] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.714332] page_type: f5(slab)
[   27.714522] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   27.714720] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.714886] page dumped because: kasan: bad access detected
[   27.715015] 
[   27.715079] Memory state around the buggy address:
[   27.715168]  fff00000c7770b00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   27.715327]  fff00000c7770b80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.715532] >fff00000c7770c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   27.715695]                    ^
[   27.715780]  fff00000c7770c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.715904]  fff00000c7770d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.716024] ==================================================================

[   12.746987] ==================================================================
[   12.747833] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   12.748096] Read of size 18446744073709551614 at addr ffff888102701304 by task kunit_try_catch/199
[   12.748426] 
[   12.748524] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   12.748572] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.748584] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.748604] Call Trace:
[   12.748618]  <TASK>
[   12.748635]  dump_stack_lvl+0x73/0xb0
[   12.748663]  print_report+0xd1/0x650
[   12.748685]  ? __virt_addr_valid+0x1db/0x2d0
[   12.748705]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.748731]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.748752]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.748792]  kasan_report+0x141/0x180
[   12.748814]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.748844]  kasan_check_range+0x10c/0x1c0
[   12.748865]  __asan_memmove+0x27/0x70
[   12.748885]  kmalloc_memmove_negative_size+0x171/0x330
[   12.748909]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   12.748935]  ? __schedule+0x10cc/0x2b30
[   12.748957]  ? __pfx_read_tsc+0x10/0x10
[   12.748976]  ? ktime_get_ts64+0x86/0x230
[   12.749001]  kunit_try_run_case+0x1a5/0x480
[   12.749024]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.749045]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.749068]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.749090]  ? __kthread_parkme+0x82/0x180
[   12.749112]  ? preempt_count_sub+0x50/0x80
[   12.749136]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.749160]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.749182]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.749206]  kthread+0x337/0x6f0
[   12.749223]  ? trace_preempt_on+0x20/0xc0
[   12.749245]  ? __pfx_kthread+0x10/0x10
[   12.749262]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.749282]  ? calculate_sigpending+0x7b/0xa0
[   12.749342]  ? __pfx_kthread+0x10/0x10
[   12.749360]  ret_from_fork+0x41/0x80
[   12.749380]  ? __pfx_kthread+0x10/0x10
[   12.749397]  ret_from_fork_asm+0x1a/0x30
[   12.749446]  </TASK>
[   12.749458] 
[   12.761396] Allocated by task 199:
[   12.761608]  kasan_save_stack+0x45/0x70
[   12.761840]  kasan_save_track+0x18/0x40
[   12.762132]  kasan_save_alloc_info+0x3b/0x50
[   12.762282]  __kasan_kmalloc+0xb7/0xc0
[   12.762452]  __kmalloc_cache_noprof+0x189/0x420
[   12.762674]  kmalloc_memmove_negative_size+0xac/0x330
[   12.763589]  kunit_try_run_case+0x1a5/0x480
[   12.764175]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.765037]  kthread+0x337/0x6f0
[   12.765525]  ret_from_fork+0x41/0x80
[   12.765966]  ret_from_fork_asm+0x1a/0x30
[   12.766121] 
[   12.766199] The buggy address belongs to the object at ffff888102701300
[   12.766199]  which belongs to the cache kmalloc-64 of size 64
[   12.767769] The buggy address is located 4 bytes inside of
[   12.767769]  64-byte region [ffff888102701300, ffff888102701340)
[   12.769234] 
[   12.769584] The buggy address belongs to the physical page:
[   12.770201] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102701
[   12.770671] flags: 0x200000000000000(node=0|zone=2)
[   12.771472] page_type: f5(slab)
[   12.772065] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.772649] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.772937] page dumped because: kasan: bad access detected
[   12.773164] 
[   12.773251] Memory state around the buggy address:
[   12.773469]  ffff888102701200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.773720]  ffff888102701280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.774033] >ffff888102701300: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.774286]                    ^
[   12.774508]  ffff888102701380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.774823]  ffff888102701400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.775062] ==================================================================