Hay
Date
June 17, 2025, 3:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   21.877246] ==================================================================
[   21.878379] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   21.878914] Read of size 18446744073709551614 at addr fff00000c7950c84 by task kunit_try_catch/182
[   21.879625] 
[   21.879748] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT 
[   21.879951] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.880017] Hardware name: linux,dummy-virt (DT)
[   21.880507] Call trace:
[   21.880581]  show_stack+0x20/0x38 (C)
[   21.880954]  dump_stack_lvl+0x8c/0xd0
[   21.881425]  print_report+0x118/0x608
[   21.881671]  kasan_report+0xdc/0x128
[   21.881917]  kasan_check_range+0x100/0x1a8
[   21.882029]  __asan_memmove+0x3c/0x98
[   21.882120]  kmalloc_memmove_negative_size+0x154/0x2e0
[   21.882216]  kunit_try_run_case+0x170/0x3f0
[   21.882324]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.882449]  kthread+0x328/0x630
[   21.882559]  ret_from_fork+0x10/0x20
[   21.882674] 
[   21.883461] Allocated by task 182:
[   21.883771]  kasan_save_stack+0x3c/0x68
[   21.883928]  kasan_save_track+0x20/0x40
[   21.884480]  kasan_save_alloc_info+0x40/0x58
[   21.884591]  __kasan_kmalloc+0xd4/0xd8
[   21.885047]  __kmalloc_cache_noprof+0x16c/0x3c0
[   21.885159]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   21.885320]  kunit_try_run_case+0x170/0x3f0
[   21.885422]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.885596]  kthread+0x328/0x630
[   21.885893]  ret_from_fork+0x10/0x20
[   21.886251] 
[   21.886320] The buggy address belongs to the object at fff00000c7950c80
[   21.886320]  which belongs to the cache kmalloc-64 of size 64
[   21.886492] The buggy address is located 4 bytes inside of
[   21.886492]  64-byte region [fff00000c7950c80, fff00000c7950cc0)
[   21.886825] 
[   21.887047] The buggy address belongs to the physical page:
[   21.887183] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107950
[   21.887332] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.887491] page_type: f5(slab)
[   21.887585] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   21.888052] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   21.888164] page dumped because: kasan: bad access detected
[   21.888651] 
[   21.888709] Memory state around the buggy address:
[   21.888833]  fff00000c7950b80: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   21.888943]  fff00000c7950c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   21.889087] >fff00000c7950c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   21.889183]                    ^
[   21.889445]  fff00000c7950d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.889556]  fff00000c7950d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.889650] ==================================================================

[   19.503780] ==================================================================
[   19.504616] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   19.506224] Read of size 18446744073709551614 at addr ffff888102eda404 by task kunit_try_catch/200
[   19.506937] 
[   19.507558] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT(voluntary) 
[   19.507635] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.507654] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   19.507685] Call Trace:
[   19.507710]  <TASK>
[   19.507735]  dump_stack_lvl+0x73/0xb0
[   19.507779]  print_report+0xd1/0x650
[   19.507815]  ? __virt_addr_valid+0x1db/0x2d0
[   19.507850]  ? kmalloc_memmove_negative_size+0x171/0x330
[   19.507897]  ? kasan_complete_mode_report_info+0x2a/0x200
[   19.507934]  ? kmalloc_memmove_negative_size+0x171/0x330
[   19.508004]  kasan_report+0x141/0x180
[   19.508084]  ? kmalloc_memmove_negative_size+0x171/0x330
[   19.508137]  kasan_check_range+0x10c/0x1c0
[   19.508170]  __asan_memmove+0x27/0x70
[   19.508204]  kmalloc_memmove_negative_size+0x171/0x330
[   19.508246]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   19.508323]  ? __schedule+0x10cc/0x2b60
[   19.508368]  ? __pfx_read_tsc+0x10/0x10
[   19.508402]  ? ktime_get_ts64+0x86/0x230
[   19.508443]  kunit_try_run_case+0x1a5/0x480
[   19.508485]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.508520]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   19.508558]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   19.508595]  ? __kthread_parkme+0x82/0x180
[   19.508629]  ? preempt_count_sub+0x50/0x80
[   19.508668]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.508706]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.508740]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   19.508777]  kthread+0x337/0x6f0
[   19.508802]  ? trace_preempt_on+0x20/0xc0
[   19.508841]  ? __pfx_kthread+0x10/0x10
[   19.508869]  ? _raw_spin_unlock_irq+0x47/0x80
[   19.508902]  ? calculate_sigpending+0x7b/0xa0
[   19.508937]  ? __pfx_kthread+0x10/0x10
[   19.508964]  ret_from_fork+0x41/0x80
[   19.508997]  ? __pfx_kthread+0x10/0x10
[   19.509025]  ret_from_fork_asm+0x1a/0x30
[   19.509100]  </TASK>
[   19.509118] 
[   19.525695] Allocated by task 200:
[   19.526208]  kasan_save_stack+0x45/0x70
[   19.526647]  kasan_save_track+0x18/0x40
[   19.527142]  kasan_save_alloc_info+0x3b/0x50
[   19.527627]  __kasan_kmalloc+0xb7/0xc0
[   19.528132]  __kmalloc_cache_noprof+0x189/0x420
[   19.528645]  kmalloc_memmove_negative_size+0xac/0x330
[   19.529161]  kunit_try_run_case+0x1a5/0x480
[   19.529641]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.530257]  kthread+0x337/0x6f0
[   19.530659]  ret_from_fork+0x41/0x80
[   19.531160]  ret_from_fork_asm+0x1a/0x30
[   19.531593] 
[   19.531844] The buggy address belongs to the object at ffff888102eda400
[   19.531844]  which belongs to the cache kmalloc-64 of size 64
[   19.533023] The buggy address is located 4 bytes inside of
[   19.533023]  64-byte region [ffff888102eda400, ffff888102eda440)
[   19.534081] 
[   19.534354] The buggy address belongs to the physical page:
[   19.534822] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102eda
[   19.535386] flags: 0x200000000000000(node=0|zone=2)
[   19.535872] page_type: f5(slab)
[   19.536387] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   19.537164] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.537841] page dumped because: kasan: bad access detected
[   19.538429] 
[   19.538658] Memory state around the buggy address:
[   19.539203]  ffff888102eda300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.539724]  ffff888102eda380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.540285] >ffff888102eda400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   19.540857]                    ^
[   19.541242]  ffff888102eda480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.541825]  ffff888102eda500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.542501] ==================================================================