Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.948406] ==================================================================
[   22.949472] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   22.950457] Read of size 18446744073709551614 at addr fff00000c645b604 by task kunit_try_catch/169
[   22.951945] 
[   22.952247] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   22.952497] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.952571] Hardware name: linux,dummy-virt (DT)
[   22.952692] Call trace:
[   22.952764]  show_stack+0x20/0x38 (C)
[   22.952928]  dump_stack_lvl+0x8c/0xd0
[   22.953008]  print_report+0x118/0x608
[   22.953131]  kasan_report+0xdc/0x128
[   22.953252]  kasan_check_range+0x100/0x1a8
[   22.953361]  __asan_memmove+0x3c/0x98
[   22.953467]  kmalloc_memmove_negative_size+0x154/0x2e0
[   22.953590]  kunit_try_run_case+0x170/0x3f0
[   22.953708]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.953825]  kthread+0x318/0x620
[   22.953951]  ret_from_fork+0x10/0x20
[   22.954089] 
[   22.960333] Allocated by task 169:
[   22.960923]  kasan_save_stack+0x3c/0x68
[   22.961566]  kasan_save_track+0x20/0x40
[   22.962176]  kasan_save_alloc_info+0x40/0x58
[   22.962854]  __kasan_kmalloc+0xd4/0xd8
[   22.963301]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.963981]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   22.964661]  kunit_try_run_case+0x170/0x3f0
[   22.965171]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.965798]  kthread+0x318/0x620
[   22.966356]  ret_from_fork+0x10/0x20
[   22.966922] 
[   22.967197] The buggy address belongs to the object at fff00000c645b600
[   22.967197]  which belongs to the cache kmalloc-64 of size 64
[   22.968548] The buggy address is located 4 bytes inside of
[   22.968548]  64-byte region [fff00000c645b600, fff00000c645b640)
[   22.969627] 
[   22.969998] The buggy address belongs to the physical page:
[   22.970656] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10645b
[   22.971613] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.972358] page_type: f5(slab)
[   22.972907] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   22.973678] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   22.974350] page dumped because: kasan: bad access detected
[   22.975060] 
[   22.976150] Memory state around the buggy address:
[   22.976605]  fff00000c645b500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   22.977339]  fff00000c645b580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   22.978300] >fff00000c645b600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   22.978988]                    ^
[   22.979677]  fff00000c645b680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.980493]  fff00000c645b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.981435] ==================================================================

[   17.840210] ==================================================================
[   17.840840] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x172/0x330
[   17.841534] Read of size 18446744073709551614 at addr ffff888102ca9204 by task kunit_try_catch/188
[   17.842983] 
[   17.843286] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   17.843426] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.843477] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.843505] Call Trace:
[   17.843528]  <TASK>
[   17.843552]  dump_stack_lvl+0x73/0xb0
[   17.843599]  print_report+0xd1/0x650
[   17.843645]  ? __virt_addr_valid+0x1db/0x2d0
[   17.843706]  ? kmalloc_memmove_negative_size+0x172/0x330
[   17.843757]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.843816]  ? kmalloc_memmove_negative_size+0x172/0x330
[   17.843927]  kasan_report+0x140/0x180
[   17.843966]  ? kmalloc_memmove_negative_size+0x172/0x330
[   17.844004]  kasan_check_range+0x10c/0x1c0
[   17.844034]  __asan_memmove+0x27/0x70
[   17.844063]  kmalloc_memmove_negative_size+0x172/0x330
[   17.844093]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   17.844124]  ? __schedule+0xce8/0x2840
[   17.844156]  ? __pfx_read_tsc+0x10/0x10
[   17.844187]  ? ktime_get_ts64+0x86/0x230
[   17.844220]  kunit_try_run_case+0x1a6/0x480
[   17.844251]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.844277]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   17.844324]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.844361]  ? __kthread_parkme+0x82/0x160
[   17.844391]  ? preempt_count_sub+0x50/0x80
[   17.844423]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.844450]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.844483]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.844514]  kthread+0x324/0x6e0
[   17.844541]  ? trace_preempt_on+0x20/0xc0
[   17.844570]  ? __pfx_kthread+0x10/0x10
[   17.844598]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.844625]  ? calculate_sigpending+0x7b/0xa0
[   17.844652]  ? __pfx_kthread+0x10/0x10
[   17.844680]  ret_from_fork+0x41/0x80
[   17.844705]  ? __pfx_kthread+0x10/0x10
[   17.844733]  ret_from_fork_asm+0x1a/0x30
[   17.844772]  </TASK>
[   17.844788] 
[   17.857092] Allocated by task 188:
[   17.857538]  kasan_save_stack+0x45/0x70
[   17.857943]  kasan_save_track+0x18/0x40
[   17.858197]  kasan_save_alloc_info+0x3b/0x50
[   17.858446]  __kasan_kmalloc+0xb7/0xc0
[   17.858793]  __kmalloc_cache_noprof+0x18a/0x420
[   17.859219]  kmalloc_memmove_negative_size+0xad/0x330
[   17.859789]  kunit_try_run_case+0x1a6/0x480
[   17.860225]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.860722]  kthread+0x324/0x6e0
[   17.861094]  ret_from_fork+0x41/0x80
[   17.861358]  ret_from_fork_asm+0x1a/0x30
[   17.861651] 
[   17.861856] The buggy address belongs to the object at ffff888102ca9200
[   17.861856]  which belongs to the cache kmalloc-64 of size 64
[   17.862394] The buggy address is located 4 bytes inside of
[   17.862394]  64-byte region [ffff888102ca9200, ffff888102ca9240)
[   17.863012] 
[   17.863223] The buggy address belongs to the physical page:
[   17.863967] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ca9
[   17.864723] flags: 0x200000000000000(node=0|zone=2)
[   17.868213] page_type: f5(slab)
[   17.868492] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   17.869258] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.869699] page dumped because: kasan: bad access detected
[   17.870212] 
[   17.870420] Memory state around the buggy address:
[   17.870741]  ffff888102ca9100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.871158]  ffff888102ca9180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.871728] >ffff888102ca9200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.872339]                    ^
[   17.872585]  ffff888102ca9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.872929]  ffff888102ca9300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.873554] ==================================================================