Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   24.826649] ==================================================================
[   24.826825] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   24.826965] Read of size 18446744073709551614 at addr fff00000c76ce204 by task kunit_try_catch/182
[   24.828066] 
[   24.828169] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT 
[   24.828382] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.828476] Hardware name: linux,dummy-virt (DT)
[   24.828555] Call trace:
[   24.828614]  show_stack+0x20/0x38 (C)
[   24.828741]  dump_stack_lvl+0x8c/0xd0
[   24.828937]  print_report+0x118/0x608
[   24.829078]  kasan_report+0xdc/0x128
[   24.829591]  kasan_check_range+0x100/0x1a8
[   24.830600]  __asan_memmove+0x3c/0x98
[   24.830761]  kmalloc_memmove_negative_size+0x154/0x2e0
[   24.830957]  kunit_try_run_case+0x170/0x3f0
[   24.831154]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.831530]  kthread+0x328/0x630
[   24.831652]  ret_from_fork+0x10/0x20
[   24.831807] 
[   24.831905] Allocated by task 182:
[   24.832027]  kasan_save_stack+0x3c/0x68
[   24.832249]  kasan_save_track+0x20/0x40
[   24.832425]  kasan_save_alloc_info+0x40/0x58
[   24.832532]  __kasan_kmalloc+0xd4/0xd8
[   24.832944]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.833053]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   24.833161]  kunit_try_run_case+0x170/0x3f0
[   24.833275]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.833421]  kthread+0x328/0x630
[   24.833526]  ret_from_fork+0x10/0x20
[   24.833884] 
[   24.834043] The buggy address belongs to the object at fff00000c76ce200
[   24.834043]  which belongs to the cache kmalloc-64 of size 64
[   24.834177] The buggy address is located 4 bytes inside of
[   24.834177]  64-byte region [fff00000c76ce200, fff00000c76ce240)
[   24.834314] 
[   24.834470] The buggy address belongs to the physical page:
[   24.834592] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076ce
[   24.834729] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.835375] page_type: f5(slab)
[   24.835572] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   24.835694] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   24.835785] page dumped because: kasan: bad access detected
[   24.835863] 
[   24.835976] Memory state around the buggy address:
[   24.836115]  fff00000c76ce100: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   24.836244]  fff00000c76ce180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   24.836351] >fff00000c76ce200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   24.836494]                    ^
[   24.836576]  fff00000c76ce280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.836876]  fff00000c76ce300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.836983] ==================================================================

[   17.500088] ==================================================================
[   17.501349] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   17.502194] Read of size 18446744073709551614 at addr ffff888102a16504 by task kunit_try_catch/201
[   17.503638] 
[   17.503908] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   17.504037] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.504074] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.504129] Call Trace:
[   17.504167]  <TASK>
[   17.504213]  dump_stack_lvl+0x73/0xb0
[   17.504293]  print_report+0xd1/0x650
[   17.504366]  ? __virt_addr_valid+0x1db/0x2d0
[   17.504445]  ? kmalloc_memmove_negative_size+0x171/0x330
[   17.504509]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.504581]  ? kmalloc_memmove_negative_size+0x171/0x330
[   17.504701]  kasan_report+0x141/0x180
[   17.504782]  ? kmalloc_memmove_negative_size+0x171/0x330
[   17.504850]  kasan_check_range+0x10c/0x1c0
[   17.504880]  __asan_memmove+0x27/0x70
[   17.504909]  kmalloc_memmove_negative_size+0x171/0x330
[   17.504939]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   17.504969]  ? __schedule+0x10cc/0x2b60
[   17.505002]  ? __pfx_read_tsc+0x10/0x10
[   17.505029]  ? ktime_get_ts64+0x86/0x230
[   17.505065]  kunit_try_run_case+0x1a5/0x480
[   17.505101]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.505132]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.505165]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.505197]  ? __kthread_parkme+0x82/0x180
[   17.505259]  ? preempt_count_sub+0x50/0x80
[   17.505303]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.505338]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.505372]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.505405]  kthread+0x337/0x6f0
[   17.505427]  ? trace_preempt_on+0x20/0xc0
[   17.505460]  ? __pfx_kthread+0x10/0x10
[   17.505483]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.505513]  ? calculate_sigpending+0x7b/0xa0
[   17.505542]  ? __pfx_kthread+0x10/0x10
[   17.505565]  ret_from_fork+0x41/0x80
[   17.505594]  ? __pfx_kthread+0x10/0x10
[   17.505670]  ret_from_fork_asm+0x1a/0x30
[   17.505774]  </TASK>
[   17.505808] 
[   17.525959] Allocated by task 201:
[   17.526384]  kasan_save_stack+0x45/0x70
[   17.526753]  kasan_save_track+0x18/0x40
[   17.527058]  kasan_save_alloc_info+0x3b/0x50
[   17.527379]  __kasan_kmalloc+0xb7/0xc0
[   17.527793]  __kmalloc_cache_noprof+0x189/0x420
[   17.528601]  kmalloc_memmove_negative_size+0xac/0x330
[   17.529493]  kunit_try_run_case+0x1a5/0x480
[   17.530355]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.531085]  kthread+0x337/0x6f0
[   17.531357]  ret_from_fork+0x41/0x80
[   17.531894]  ret_from_fork_asm+0x1a/0x30
[   17.532348] 
[   17.532582] The buggy address belongs to the object at ffff888102a16500
[   17.532582]  which belongs to the cache kmalloc-64 of size 64
[   17.533577] The buggy address is located 4 bytes inside of
[   17.533577]  64-byte region [ffff888102a16500, ffff888102a16540)
[   17.534631] 
[   17.534846] The buggy address belongs to the physical page:
[   17.535270] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a16
[   17.535962] flags: 0x200000000000000(node=0|zone=2)
[   17.536411] page_type: f5(slab)
[   17.536984] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   17.537783] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.538401] page dumped because: kasan: bad access detected
[   17.538922] 
[   17.539143] Memory state around the buggy address:
[   17.539755]  ffff888102a16400: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   17.540262]  ffff888102a16480: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.541045] >ffff888102a16500: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.541806]                    ^
[   17.542166]  ffff888102a16580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.542904]  ffff888102a16600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.543454] ==================================================================