Hay
Date
July 10, 2025, 6:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.972480] ==================================================================
[   16.972548] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   16.972606] Read of size 18446744073709551614 at addr fff00000c5a1d904 by task kunit_try_catch/180
[   16.972682] 
[   16.972715] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.972797] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.972822] Hardware name: linux,dummy-virt (DT)
[   16.972851] Call trace:
[   16.972893]  show_stack+0x20/0x38 (C)
[   16.972944]  dump_stack_lvl+0x8c/0xd0
[   16.973003]  print_report+0x118/0x608
[   16.973056]  kasan_report+0xdc/0x128
[   16.973101]  kasan_check_range+0x100/0x1a8
[   16.973155]  __asan_memmove+0x3c/0x98
[   16.973199]  kmalloc_memmove_negative_size+0x154/0x2e0
[   16.973256]  kunit_try_run_case+0x170/0x3f0
[   16.973314]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.974250]  kthread+0x328/0x630
[   16.974351]  ret_from_fork+0x10/0x20
[   16.974459] 
[   16.974539] Allocated by task 180:
[   16.974880]  kasan_save_stack+0x3c/0x68
[   16.974963]  kasan_save_track+0x20/0x40
[   16.975006]  kasan_save_alloc_info+0x40/0x58
[   16.975047]  __kasan_kmalloc+0xd4/0xd8
[   16.975083]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.975304]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   16.975505]  kunit_try_run_case+0x170/0x3f0
[   16.975735]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.975930]  kthread+0x328/0x630
[   16.976126]  ret_from_fork+0x10/0x20
[   16.976371] 
[   16.976426] The buggy address belongs to the object at fff00000c5a1d900
[   16.976426]  which belongs to the cache kmalloc-64 of size 64
[   16.976670] The buggy address is located 4 bytes inside of
[   16.976670]  64-byte region [fff00000c5a1d900, fff00000c5a1d940)
[   16.976818] 
[   16.976987] The buggy address belongs to the physical page:
[   16.977018] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a1d
[   16.977504] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.977628] page_type: f5(slab)
[   16.977856] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   16.978412] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   16.980055] page dumped because: kasan: bad access detected
[   16.980296] 
[   16.980374] Memory state around the buggy address:
[   16.980409]  fff00000c5a1d800: 00 00 00 00 05 fc fc fc fc fc fc fc fc fc fc fc
[   16.980679]  fff00000c5a1d880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.980926] >fff00000c5a1d900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   16.981105]                    ^
[   16.981255]  fff00000c5a1d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.981349]  fff00000c5a1da00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.981735] ==================================================================

[   12.684766] ==================================================================
[   12.685351] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   12.685700] Read of size 18446744073709551614 at addr ffff8881039ff584 by task kunit_try_catch/197
[   12.686384] 
[   12.686503] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.686546] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.686557] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.686577] Call Trace:
[   12.686589]  <TASK>
[   12.686603]  dump_stack_lvl+0x73/0xb0
[   12.686658]  print_report+0xd1/0x650
[   12.686681]  ? __virt_addr_valid+0x1db/0x2d0
[   12.686721]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.686747]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.686770]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.686816]  kasan_report+0x141/0x180
[   12.686838]  ? kmalloc_memmove_negative_size+0x171/0x330
[   12.686868]  kasan_check_range+0x10c/0x1c0
[   12.686891]  __asan_memmove+0x27/0x70
[   12.686910]  kmalloc_memmove_negative_size+0x171/0x330
[   12.686964]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   12.686993]  ? __schedule+0x10cc/0x2b60
[   12.687016]  ? __pfx_read_tsc+0x10/0x10
[   12.687070]  ? ktime_get_ts64+0x86/0x230
[   12.687097]  kunit_try_run_case+0x1a5/0x480
[   12.687190]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.687214]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.687238]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.687261]  ? __kthread_parkme+0x82/0x180
[   12.687281]  ? preempt_count_sub+0x50/0x80
[   12.687306]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.687330]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.687353]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.687378]  kthread+0x337/0x6f0
[   12.687397]  ? trace_preempt_on+0x20/0xc0
[   12.687420]  ? __pfx_kthread+0x10/0x10
[   12.687440]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.687461]  ? calculate_sigpending+0x7b/0xa0
[   12.687485]  ? __pfx_kthread+0x10/0x10
[   12.687506]  ret_from_fork+0x116/0x1d0
[   12.687524]  ? __pfx_kthread+0x10/0x10
[   12.687544]  ret_from_fork_asm+0x1a/0x30
[   12.687575]  </TASK>
[   12.687584] 
[   12.695989] Allocated by task 197:
[   12.696151]  kasan_save_stack+0x45/0x70
[   12.696373]  kasan_save_track+0x18/0x40
[   12.696560]  kasan_save_alloc_info+0x3b/0x50
[   12.696755]  __kasan_kmalloc+0xb7/0xc0
[   12.696947]  __kmalloc_cache_noprof+0x189/0x420
[   12.697216]  kmalloc_memmove_negative_size+0xac/0x330
[   12.697475]  kunit_try_run_case+0x1a5/0x480
[   12.697688]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.698027]  kthread+0x337/0x6f0
[   12.698243]  ret_from_fork+0x116/0x1d0
[   12.698373]  ret_from_fork_asm+0x1a/0x30
[   12.698511] 
[   12.698582] The buggy address belongs to the object at ffff8881039ff580
[   12.698582]  which belongs to the cache kmalloc-64 of size 64
[   12.699069] The buggy address is located 4 bytes inside of
[   12.699069]  64-byte region [ffff8881039ff580, ffff8881039ff5c0)
[   12.699764] 
[   12.700001] The buggy address belongs to the physical page:
[   12.700350] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ff
[   12.700749] flags: 0x200000000000000(node=0|zone=2)
[   12.701264] page_type: f5(slab)
[   12.701436] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.701691] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.701916] page dumped because: kasan: bad access detected
[   12.702097] 
[   12.702166] Memory state around the buggy address:
[   12.702321]  ffff8881039ff480: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   12.702715]  ffff8881039ff500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.703098] >ffff8881039ff580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.703446]                    ^
[   12.703634]  ffff8881039ff600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.704018]  ffff8881039ff680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.704564] ==================================================================