Hay
Date
July 20, 2025, 8:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.265673] ==================================================================
[   15.265741] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   15.265841] Read of size 18446744073709551614 at addr fff00000c770c004 by task kunit_try_catch/181
[   15.265939] 
[   15.265973] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.266052] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.266079] Hardware name: linux,dummy-virt (DT)
[   15.266109] Call trace:
[   15.266131]  show_stack+0x20/0x38 (C)
[   15.266181]  dump_stack_lvl+0x8c/0xd0
[   15.266240]  print_report+0x118/0x5d0
[   15.266285]  kasan_report+0xdc/0x128
[   15.266329]  kasan_check_range+0x100/0x1a8
[   15.266376]  __asan_memmove+0x3c/0x98
[   15.266417]  kmalloc_memmove_negative_size+0x154/0x2e0
[   15.266466]  kunit_try_run_case+0x170/0x3f0
[   15.266512]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.266563]  kthread+0x328/0x630
[   15.266786]  ret_from_fork+0x10/0x20
[   15.266835] 
[   15.266857] Allocated by task 181:
[   15.266884]  kasan_save_stack+0x3c/0x68
[   15.266923]  kasan_save_track+0x20/0x40
[   15.266960]  kasan_save_alloc_info+0x40/0x58
[   15.267001]  __kasan_kmalloc+0xd4/0xd8
[   15.267038]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.267088]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   15.267132]  kunit_try_run_case+0x170/0x3f0
[   15.267171]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.267807]  kthread+0x328/0x630
[   15.267863]  ret_from_fork+0x10/0x20
[   15.267899] 
[   15.268251] The buggy address belongs to the object at fff00000c770c000
[   15.268251]  which belongs to the cache kmalloc-64 of size 64
[   15.268854] The buggy address is located 4 bytes inside of
[   15.268854]  64-byte region [fff00000c770c000, fff00000c770c040)
[   15.269028] 
[   15.269142] The buggy address belongs to the physical page:
[   15.269216] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10770c
[   15.269647] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.269753] page_type: f5(slab)
[   15.269864] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   15.269932] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   15.270181] page dumped because: kasan: bad access detected
[   15.270325] 
[   15.270430] Memory state around the buggy address:
[   15.270698]  fff00000c770bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.270868]  fff00000c770bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.270946] >fff00000c770c000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.271095]                    ^
[   15.271163]  fff00000c770c080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.271573]  fff00000c770c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.271657] ==================================================================

[   13.136757] ==================================================================
[   13.137422] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   13.137970] Read of size 18446744073709551614 at addr ffff88810389b904 by task kunit_try_catch/198
[   13.138535] 
[   13.138666] CPU: 1 UID: 0 PID: 198 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.138714] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.138726] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.138747] Call Trace:
[   13.138759]  <TASK>
[   13.138777]  dump_stack_lvl+0x73/0xb0
[   13.138809]  print_report+0xd1/0x610
[   13.139061]  ? __virt_addr_valid+0x1db/0x2d0
[   13.139089]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.139115]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.139137]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.139183]  kasan_report+0x141/0x180
[   13.139206]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.139235]  kasan_check_range+0x10c/0x1c0
[   13.139259]  __asan_memmove+0x27/0x70
[   13.139278]  kmalloc_memmove_negative_size+0x171/0x330
[   13.139303]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   13.139328]  ? __schedule+0x10c6/0x2b60
[   13.139351]  ? __pfx_read_tsc+0x10/0x10
[   13.139372]  ? ktime_get_ts64+0x86/0x230
[   13.139396]  kunit_try_run_case+0x1a5/0x480
[   13.139422]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.139444]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.139482]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.139506]  ? __kthread_parkme+0x82/0x180
[   13.139527]  ? preempt_count_sub+0x50/0x80
[   13.139551]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.139574]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.139598]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.139621]  kthread+0x337/0x6f0
[   13.139640]  ? trace_preempt_on+0x20/0xc0
[   13.139663]  ? __pfx_kthread+0x10/0x10
[   13.139684]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.139706]  ? calculate_sigpending+0x7b/0xa0
[   13.139730]  ? __pfx_kthread+0x10/0x10
[   13.139751]  ret_from_fork+0x116/0x1d0
[   13.139770]  ? __pfx_kthread+0x10/0x10
[   13.139790]  ret_from_fork_asm+0x1a/0x30
[   13.139821]  </TASK>
[   13.139834] 
[   13.150902] Allocated by task 198:
[   13.151325]  kasan_save_stack+0x45/0x70
[   13.151600]  kasan_save_track+0x18/0x40
[   13.151814]  kasan_save_alloc_info+0x3b/0x50
[   13.152005]  __kasan_kmalloc+0xb7/0xc0
[   13.152324]  __kmalloc_cache_noprof+0x189/0x420
[   13.152594]  kmalloc_memmove_negative_size+0xac/0x330
[   13.152851]  kunit_try_run_case+0x1a5/0x480
[   13.153311]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.153662]  kthread+0x337/0x6f0
[   13.153802]  ret_from_fork+0x116/0x1d0
[   13.154180]  ret_from_fork_asm+0x1a/0x30
[   13.154575] 
[   13.154670] The buggy address belongs to the object at ffff88810389b900
[   13.154670]  which belongs to the cache kmalloc-64 of size 64
[   13.155569] The buggy address is located 4 bytes inside of
[   13.155569]  64-byte region [ffff88810389b900, ffff88810389b940)
[   13.156362] 
[   13.156485] The buggy address belongs to the physical page:
[   13.156737] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10389b
[   13.157451] flags: 0x200000000000000(node=0|zone=2)
[   13.157713] page_type: f5(slab)
[   13.157983] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   13.158626] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   13.159040] page dumped because: kasan: bad access detected
[   13.159364] 
[   13.159449] Memory state around the buggy address:
[   13.159669]  ffff88810389b800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.160494]  ffff88810389b880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.160803] >ffff88810389b900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   13.161264]                    ^
[   13.161397]  ffff88810389b980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.161733]  ffff88810389ba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.162393] ==================================================================