Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.930752] ==================================================================
[   17.930824] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   17.931012] Read of size 18446744073709551614 at addr fff00000c63d1f04 by task kunit_try_catch/182
[   17.931287] 
[   17.931668] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   17.931909] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.932161] Hardware name: linux,dummy-virt (DT)
[   17.932192] Call trace:
[   17.932215]  show_stack+0x20/0x38 (C)
[   17.932269]  dump_stack_lvl+0x8c/0xd0
[   17.933100]  print_report+0x118/0x608
[   17.933303]  kasan_report+0xdc/0x128
[   17.933405]  kasan_check_range+0x100/0x1a8
[   17.933580]  __asan_memmove+0x3c/0x98
[   17.933661]  kmalloc_memmove_negative_size+0x154/0x2e0
[   17.933722]  kunit_try_run_case+0x170/0x3f0
[   17.933770]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.933918]  kthread+0x328/0x630
[   17.934169]  ret_from_fork+0x10/0x20
[   17.934472] 
[   17.934987] Allocated by task 182:
[   17.935281]  kasan_save_stack+0x3c/0x68
[   17.935376]  kasan_save_track+0x20/0x40
[   17.935650]  kasan_save_alloc_info+0x40/0x58
[   17.935825]  __kasan_kmalloc+0xd4/0xd8
[   17.935865]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.935905]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   17.935967]  kunit_try_run_case+0x170/0x3f0
[   17.936365]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.936414]  kthread+0x328/0x630
[   17.936580]  ret_from_fork+0x10/0x20
[   17.936625] 
[   17.936780] The buggy address belongs to the object at fff00000c63d1f00
[   17.936780]  which belongs to the cache kmalloc-64 of size 64
[   17.936901] The buggy address is located 4 bytes inside of
[   17.936901]  64-byte region [fff00000c63d1f00, fff00000c63d1f40)
[   17.936962] 
[   17.937176] The buggy address belongs to the physical page:
[   17.937218] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063d1
[   17.937274] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.937536] page_type: f5(slab)
[   17.937722] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   17.937843] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.938183] page dumped because: kasan: bad access detected
[   17.938297] 
[   17.938316] Memory state around the buggy address:
[   17.938359]  fff00000c63d1e00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   17.938405]  fff00000c63d1e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.938654] >fff00000c63d1f00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.938707]                    ^
[   17.938736]  fff00000c63d1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.938896]  fff00000c63d2000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.938942] ==================================================================

[   11.458916] ==================================================================
[   11.459710] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   11.460364] Read of size 18446744073709551614 at addr ffff8881029cff84 by task kunit_try_catch/200
[   11.460912] 
[   11.461017] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   11.461062] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.461074] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.461096] Call Trace:
[   11.461108]  <TASK>
[   11.461123]  dump_stack_lvl+0x73/0xb0
[   11.461149]  print_report+0xd1/0x650
[   11.461173]  ? __virt_addr_valid+0x1db/0x2d0
[   11.461195]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.461250]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.461274]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.461316]  kasan_report+0x141/0x180
[   11.461341]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.461368]  kasan_check_range+0x10c/0x1c0
[   11.461388]  __asan_memmove+0x27/0x70
[   11.461409]  kmalloc_memmove_negative_size+0x171/0x330
[   11.461431]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.461453]  ? __schedule+0x10cc/0x2b60
[   11.461476]  ? __pfx_read_tsc+0x10/0x10
[   11.461496]  ? ktime_get_ts64+0x86/0x230
[   11.461539]  kunit_try_run_case+0x1a5/0x480
[   11.461561]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.461580]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.461604]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.461628]  ? __kthread_parkme+0x82/0x180
[   11.461650]  ? preempt_count_sub+0x50/0x80
[   11.461674]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.461694]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.461717]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.461740]  kthread+0x337/0x6f0
[   11.461757]  ? trace_preempt_on+0x20/0xc0
[   11.461781]  ? __pfx_kthread+0x10/0x10
[   11.461799]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.461821]  ? calculate_sigpending+0x7b/0xa0
[   11.461857]  ? __pfx_kthread+0x10/0x10
[   11.461887]  ret_from_fork+0x41/0x80
[   11.461908]  ? __pfx_kthread+0x10/0x10
[   11.461926]  ret_from_fork_asm+0x1a/0x30
[   11.461957]  </TASK>
[   11.461968] 
[   11.474299] Allocated by task 200:
[   11.474486]  kasan_save_stack+0x45/0x70
[   11.474693]  kasan_save_track+0x18/0x40
[   11.475084]  kasan_save_alloc_info+0x3b/0x50
[   11.475401]  __kasan_kmalloc+0xb7/0xc0
[   11.475771]  __kmalloc_cache_noprof+0x189/0x420
[   11.476020]  kmalloc_memmove_negative_size+0xac/0x330
[   11.476250]  kunit_try_run_case+0x1a5/0x480
[   11.476443]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.477093]  kthread+0x337/0x6f0
[   11.477391]  ret_from_fork+0x41/0x80
[   11.477799]  ret_from_fork_asm+0x1a/0x30
[   11.478253] 
[   11.478488] The buggy address belongs to the object at ffff8881029cff80
[   11.478488]  which belongs to the cache kmalloc-64 of size 64
[   11.479702] The buggy address is located 4 bytes inside of
[   11.479702]  64-byte region [ffff8881029cff80, ffff8881029cffc0)
[   11.480635] 
[   11.480894] The buggy address belongs to the physical page:
[   11.481187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029cf
[   11.481717] flags: 0x200000000000000(node=0|zone=2)
[   11.482187] page_type: f5(slab)
[   11.482435] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.482998] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.483322] page dumped because: kasan: bad access detected
[   11.483684] 
[   11.483773] Memory state around the buggy address:
[   11.484200]  ffff8881029cfe80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.484641]  ffff8881029cff00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.485068] >ffff8881029cff80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.485627]                    ^
[   11.485794]  ffff8881029d0000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.486215]  ffff8881029d0080: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   11.486662] ==================================================================