Hay
Date
June 25, 2025, 8:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   26.726830] ==================================================================
[   26.727045] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   26.727122] Read of size 18446744073709551614 at addr fff00000c78b0804 by task kunit_try_catch/192
[   26.727500] 
[   26.727562] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT 
[   26.727715] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.727820] Hardware name: linux,dummy-virt (DT)
[   26.727855] Call trace:
[   26.728068]  show_stack+0x20/0x38 (C)
[   26.728403]  dump_stack_lvl+0x8c/0xd0
[   26.728619]  print_report+0x118/0x608
[   26.728826]  kasan_report+0xdc/0x128
[   26.729101]  kasan_check_range+0x100/0x1a8
[   26.729155]  __asan_memmove+0x3c/0x98
[   26.729243]  kmalloc_memmove_negative_size+0x154/0x2e0
[   26.729537]  kunit_try_run_case+0x170/0x3f0
[   26.729628]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.729853]  kthread+0x328/0x630
[   26.729906]  ret_from_fork+0x10/0x20
[   26.729956] 
[   26.730044] Allocated by task 192:
[   26.730109]  kasan_save_stack+0x3c/0x68
[   26.730162]  kasan_save_track+0x20/0x40
[   26.730209]  kasan_save_alloc_info+0x40/0x58
[   26.730250]  __kasan_kmalloc+0xd4/0xd8
[   26.730302]  __kmalloc_cache_noprof+0x16c/0x3c0
[   26.730343]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   26.730419]  kunit_try_run_case+0x170/0x3f0
[   26.730469]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.730512]  kthread+0x328/0x630
[   26.730545]  ret_from_fork+0x10/0x20
[   26.730582] 
[   26.730607] The buggy address belongs to the object at fff00000c78b0800
[   26.730607]  which belongs to the cache kmalloc-64 of size 64
[   26.730679] The buggy address is located 4 bytes inside of
[   26.730679]  64-byte region [fff00000c78b0800, fff00000c78b0840)
[   26.730738] 
[   26.730767] The buggy address belongs to the physical page:
[   26.730800] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078b0
[   26.730866] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.730940] page_type: f5(slab)
[   26.730987] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   26.731052] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   26.731101] page dumped because: kasan: bad access detected
[   26.731134] 
[   26.731152] Memory state around the buggy address:
[   26.731214]  fff00000c78b0700: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   26.731274]  fff00000c78b0780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   26.731316] >fff00000c78b0800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   26.731360]                    ^
[   26.731434]  fff00000c78b0880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.731862]  fff00000c78b0900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.731924] ==================================================================

[   22.045502] ==================================================================
[   22.045995] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   22.047031] Read of size 18446744073709551614 at addr ffff888103958c84 by task kunit_try_catch/209
[   22.047641] 
[   22.047739] CPU: 1 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT(voluntary) 
[   22.047789] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.047802] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.047833] Call Trace:
[   22.047850]  <TASK>
[   22.047871]  dump_stack_lvl+0x73/0xb0
[   22.047926]  print_report+0xd1/0x650
[   22.047978]  ? __virt_addr_valid+0x1db/0x2d0
[   22.048008]  ? kmalloc_memmove_negative_size+0x171/0x330
[   22.048044]  ? kasan_complete_mode_report_info+0x2a/0x200
[   22.048071]  ? kmalloc_memmove_negative_size+0x171/0x330
[   22.048131]  kasan_report+0x141/0x180
[   22.048157]  ? kmalloc_memmove_negative_size+0x171/0x330
[   22.048208]  kasan_check_range+0x10c/0x1c0
[   22.048237]  __asan_memmove+0x27/0x70
[   22.048263]  kmalloc_memmove_negative_size+0x171/0x330
[   22.048289]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   22.048316]  ? __schedule+0x10cc/0x2b60
[   22.048350]  ? __pfx_read_tsc+0x10/0x10
[   22.048373]  ? ktime_get_ts64+0x86/0x230
[   22.048404]  kunit_try_run_case+0x1a5/0x480
[   22.048433]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.048457]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.048479]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.048506]  ? __kthread_parkme+0x82/0x180
[   22.048529]  ? preempt_count_sub+0x50/0x80
[   22.048558]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.048584]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.048609]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.048633]  kthread+0x337/0x6f0
[   22.048654]  ? trace_preempt_on+0x20/0xc0
[   22.048680]  ? __pfx_kthread+0x10/0x10
[   22.048703]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.048727]  ? calculate_sigpending+0x7b/0xa0
[   22.048753]  ? __pfx_kthread+0x10/0x10
[   22.048777]  ret_from_fork+0x116/0x1d0
[   22.048797]  ? __pfx_kthread+0x10/0x10
[   22.048820]  ret_from_fork_asm+0x1a/0x30
[   22.048864]  </TASK>
[   22.048876] 
[   22.061697] Allocated by task 209:
[   22.061872]  kasan_save_stack+0x45/0x70
[   22.062254]  kasan_save_track+0x18/0x40
[   22.062654]  kasan_save_alloc_info+0x3b/0x50
[   22.063143]  __kasan_kmalloc+0xb7/0xc0
[   22.063419]  __kmalloc_cache_noprof+0x189/0x420
[   22.063564]  kmalloc_memmove_negative_size+0xac/0x330
[   22.063715]  kunit_try_run_case+0x1a5/0x480
[   22.063981]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.064526]  kthread+0x337/0x6f0
[   22.064836]  ret_from_fork+0x116/0x1d0
[   22.065268]  ret_from_fork_asm+0x1a/0x30
[   22.065636] 
[   22.065807] The buggy address belongs to the object at ffff888103958c80
[   22.065807]  which belongs to the cache kmalloc-64 of size 64
[   22.067038] The buggy address is located 4 bytes inside of
[   22.067038]  64-byte region [ffff888103958c80, ffff888103958cc0)
[   22.067490] 
[   22.067560] The buggy address belongs to the physical page:
[   22.067730] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103958
[   22.068269] flags: 0x200000000000000(node=0|zone=2)
[   22.068793] page_type: f5(slab)
[   22.069206] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   22.069848] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   22.070743] page dumped because: kasan: bad access detected
[   22.071377] 
[   22.071599] Memory state around the buggy address:
[   22.071885]  ffff888103958b80: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   22.072377]  ffff888103958c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   22.072595] >ffff888103958c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   22.072799]                    ^
[   22.072917]  ffff888103958d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.073263]  ffff888103958d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.073565] ==================================================================