Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.614419] ==================================================================
[   15.614489] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   15.614597] Read of size 18446744073709551614 at addr fff00000c6532b04 by task kunit_try_catch/181
[   15.614741] 
[   15.614849] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.614931] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.614957] Hardware name: linux,dummy-virt (DT)
[   15.615089] Call trace:
[   15.615110]  show_stack+0x20/0x38 (C)
[   15.615278]  dump_stack_lvl+0x8c/0xd0
[   15.615370]  print_report+0x118/0x5d0
[   15.615465]  kasan_report+0xdc/0x128
[   15.615548]  kasan_check_range+0x100/0x1a8
[   15.615604]  __asan_memmove+0x3c/0x98
[   15.615650]  kmalloc_memmove_negative_size+0x154/0x2e0
[   15.615704]  kunit_try_run_case+0x170/0x3f0
[   15.615751]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.615902]  kthread+0x328/0x630
[   15.616318]  ret_from_fork+0x10/0x20
[   15.616513] 
[   15.616619] Allocated by task 181:
[   15.616716]  kasan_save_stack+0x3c/0x68
[   15.616758]  kasan_save_track+0x20/0x40
[   15.616814]  kasan_save_alloc_info+0x40/0x58
[   15.616918]  __kasan_kmalloc+0xd4/0xd8
[   15.616994]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.617086]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   15.617233]  kunit_try_run_case+0x170/0x3f0
[   15.617272]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.617341]  kthread+0x328/0x630
[   15.617375]  ret_from_fork+0x10/0x20
[   15.617410] 
[   15.617429] The buggy address belongs to the object at fff00000c6532b00
[   15.617429]  which belongs to the cache kmalloc-64 of size 64
[   15.617503] The buggy address is located 4 bytes inside of
[   15.617503]  64-byte region [fff00000c6532b00, fff00000c6532b40)
[   15.617804] 
[   15.617852] The buggy address belongs to the physical page:
[   15.617934] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106532
[   15.618032] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.618158] page_type: f5(slab)
[   15.618234] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   15.618327] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   15.618445] page dumped because: kasan: bad access detected
[   15.618563] 
[   15.618636] Memory state around the buggy address:
[   15.618697]  fff00000c6532a00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   15.618758]  fff00000c6532a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.619026] >fff00000c6532b00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.619153]                    ^
[   15.619203]  fff00000c6532b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.619274]  fff00000c6532c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.619409] ==================================================================

[   12.712206] ==================================================================
[   12.712624] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   12.712925] Read of size 18446744073709551614 at addr ffff8881032ecb04 by task kunit_try_catch/197
[   12.713440] 
[   12.713564] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.713845] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.713866] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.714062] Call Trace:
[   12.714076]  <TASK>
[   12.714091]  dump_stack_lvl+0x73/0xb0
[   12.714123]  print_report+0xd1/0x610
[   12.714145]  ? __virt_addr_valid+0x1db/0x2d0
[   12.714167]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.714192]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.714215]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.714264]  kasan_report+0x141/0x180
[   12.714286]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.714316]  kasan_check_range+0x10c/0x1c0
[   12.714413]  __asan_memmove+0x27/0x70
[   12.714434]  kmalloc_memmove_negative_size+0x171/0x330
[   12.714460]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   12.714487]  ? __schedule+0x10cc/0x2b60
[   12.714508]  ? __pfx_read_tsc+0x10/0x10
[   12.714530]  ? ktime_get_ts64+0x86/0x230
[   12.714554]  kunit_try_run_case+0x1a5/0x480
[   12.714578]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.714601]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.714625]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.714648]  ? __kthread_parkme+0x82/0x180
[   12.714668]  ? preempt_count_sub+0x50/0x80
[   12.714692]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.714716]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.714740]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.714778]  kthread+0x337/0x6f0
[   12.714797]  ? trace_preempt_on+0x20/0xc0
[   12.714820]  ? __pfx_kthread+0x10/0x10
[   12.714840]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.714861]  ? calculate_sigpending+0x7b/0xa0
[   12.714885]  ? __pfx_kthread+0x10/0x10
[   12.714906]  ret_from_fork+0x116/0x1d0
[   12.714924]  ? __pfx_kthread+0x10/0x10
[   12.714944]  ret_from_fork_asm+0x1a/0x30
[   12.714974]  </TASK>
[   12.714983] 
[   12.722787] Allocated by task 197:
[   12.722971]  kasan_save_stack+0x45/0x70
[   12.723229]  kasan_save_track+0x18/0x40
[   12.723537]  kasan_save_alloc_info+0x3b/0x50
[   12.723691]  __kasan_kmalloc+0xb7/0xc0
[   12.723871]  __kmalloc_cache_noprof+0x189/0x420
[   12.724095]  kmalloc_memmove_negative_size+0xac/0x330
[   12.724331]  kunit_try_run_case+0x1a5/0x480
[   12.724661]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.724880]  kthread+0x337/0x6f0
[   12.725051]  ret_from_fork+0x116/0x1d0
[   12.725242]  ret_from_fork_asm+0x1a/0x30
[   12.725564] 
[   12.725638] The buggy address belongs to the object at ffff8881032ecb00
[   12.725638]  which belongs to the cache kmalloc-64 of size 64
[   12.726208] The buggy address is located 4 bytes inside of
[   12.726208]  64-byte region [ffff8881032ecb00, ffff8881032ecb40)
[   12.726816] 
[   12.726919] The buggy address belongs to the physical page:
[   12.727144] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1032ec
[   12.727411] flags: 0x200000000000000(node=0|zone=2)
[   12.727574] page_type: f5(slab)
[   12.727694] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.728023] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.728361] page dumped because: kasan: bad access detected
[   12.728610] 
[   12.728697] Memory state around the buggy address:
[   12.728930]  ffff8881032eca00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.729145]  ffff8881032eca80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.729358] >ffff8881032ecb00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.729922]                    ^
[   12.730088]  ffff8881032ecb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.730422]  ffff8881032ecc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.730999] ==================================================================