Hay
Date
April 20, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   23.393564] ==================================================================
[   23.393701] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   23.393813] Read of size 18446744073709551614 at addr fff00000c6819a84 by task kunit_try_catch/182
[   23.393998] 
[   23.394066] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   23.394260] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.394455] Hardware name: linux,dummy-virt (DT)
[   23.394531] Call trace:
[   23.394581]  show_stack+0x20/0x38 (C)
[   23.394695]  dump_stack_lvl+0x8c/0xd0
[   23.394816]  print_report+0x118/0x608
[   23.395033]  kasan_report+0xdc/0x128
[   23.395242]  kasan_check_range+0x100/0x1a8
[   23.395995]  __asan_memmove+0x3c/0x98
[   23.396204]  kmalloc_memmove_negative_size+0x154/0x2e0
[   23.396746]  kunit_try_run_case+0x170/0x3f0
[   23.397132]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.397307]  kthread+0x328/0x630
[   23.397644]  ret_from_fork+0x10/0x20
[   23.398031] 
[   23.398094] Allocated by task 182:
[   23.398506]  kasan_save_stack+0x3c/0x68
[   23.398667]  kasan_save_track+0x20/0x40
[   23.399058]  kasan_save_alloc_info+0x40/0x58
[   23.399637]  __kasan_kmalloc+0xd4/0xd8
[   23.399762]  __kmalloc_cache_noprof+0x15c/0x3c0
[   23.399876]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   23.401074]  kunit_try_run_case+0x170/0x3f0
[   23.402409]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.402804]  kthread+0x328/0x630
[   23.402896]  ret_from_fork+0x10/0x20
[   23.403001] 
[   23.403624] The buggy address belongs to the object at fff00000c6819a80
[   23.403624]  which belongs to the cache kmalloc-64 of size 64
[   23.404348] The buggy address is located 4 bytes inside of
[   23.404348]  64-byte region [fff00000c6819a80, fff00000c6819ac0)
[   23.404845] 
[   23.404895] The buggy address belongs to the physical page:
[   23.405506] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106819
[   23.405663] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.405882] page_type: f5(slab)
[   23.406252] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   23.406375] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   23.406469] page dumped because: kasan: bad access detected
[   23.406970] 
[   23.407031] Memory state around the buggy address:
[   23.407339]  fff00000c6819980: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   23.407693]  fff00000c6819a00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   23.407969] >fff00000c6819a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   23.408568]                    ^
[   23.408654]  fff00000c6819b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.408807]  fff00000c6819b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.408916] ==================================================================

[   11.673877] ==================================================================
[   11.675046] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   11.675502] Read of size 18446744073709551614 at addr ffff888102b3f204 by task kunit_try_catch/200
[   11.675878] 
[   11.676458] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   11.676505] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.676517] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.676537] Call Trace:
[   11.676548]  <TASK>
[   11.676563]  dump_stack_lvl+0x73/0xb0
[   11.676589]  print_report+0xd1/0x650
[   11.676611]  ? __virt_addr_valid+0x1db/0x2d0
[   11.676633]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.676657]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.676679]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.676724]  kasan_report+0x141/0x180
[   11.676747]  ? kmalloc_memmove_negative_size+0x171/0x330
[   11.676777]  kasan_check_range+0x10c/0x1c0
[   11.676801]  __asan_memmove+0x27/0x70
[   11.676821]  kmalloc_memmove_negative_size+0x171/0x330
[   11.676845]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   11.676871]  ? __schedule+0x10cc/0x2b30
[   11.676894]  ? __pfx_read_tsc+0x10/0x10
[   11.676914]  ? ktime_get_ts64+0x86/0x230
[   11.676938]  kunit_try_run_case+0x1a5/0x480
[   11.676961]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.676982]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.677004]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.677028]  ? __kthread_parkme+0x82/0x180
[   11.677049]  ? preempt_count_sub+0x50/0x80
[   11.677073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.677096]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.677117]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.677200]  kthread+0x337/0x6f0
[   11.677221]  ? trace_preempt_on+0x20/0xc0
[   11.677245]  ? __pfx_kthread+0x10/0x10
[   11.677267]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.677289]  ? calculate_sigpending+0x7b/0xa0
[   11.677310]  ? __pfx_kthread+0x10/0x10
[   11.677344]  ret_from_fork+0x41/0x80
[   11.677365]  ? __pfx_kthread+0x10/0x10
[   11.677420]  ret_from_fork_asm+0x1a/0x30
[   11.677454]  </TASK>
[   11.677465] 
[   11.687344] Allocated by task 200:
[   11.687808]  kasan_save_stack+0x45/0x70
[   11.688007]  kasan_save_track+0x18/0x40
[   11.688247]  kasan_save_alloc_info+0x3b/0x50
[   11.688627]  __kasan_kmalloc+0xb7/0xc0
[   11.688788]  __kmalloc_cache_noprof+0x189/0x420
[   11.689001]  kmalloc_memmove_negative_size+0xac/0x330
[   11.689447]  kunit_try_run_case+0x1a5/0x480
[   11.689646]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.689881]  kthread+0x337/0x6f0
[   11.690158]  ret_from_fork+0x41/0x80
[   11.690333]  ret_from_fork_asm+0x1a/0x30
[   11.690610] 
[   11.690699] The buggy address belongs to the object at ffff888102b3f200
[   11.690699]  which belongs to the cache kmalloc-64 of size 64
[   11.691230] The buggy address is located 4 bytes inside of
[   11.691230]  64-byte region [ffff888102b3f200, ffff888102b3f240)
[   11.691863] 
[   11.691979] The buggy address belongs to the physical page:
[   11.692352] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b3f
[   11.692760] flags: 0x200000000000000(node=0|zone=2)
[   11.692977] page_type: f5(slab)
[   11.693438] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   11.693737] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   11.694145] page dumped because: kasan: bad access detected
[   11.694378] 
[   11.694508] Memory state around the buggy address:
[   11.695098]  ffff888102b3f100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.695492]  ffff888102b3f180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   11.695761] >ffff888102b3f200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   11.696035]                    ^
[   11.696214]  ffff888102b3f280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.696475]  ffff888102b3f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.696807] ==================================================================

[   21.580514] ==================================================================
[   21.581582] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   21.582295] Read of size 18446744073709551614 at addr ffff00000fdabc04 by task kunit_try_catch/234
[   21.583127] 
[   21.583292] CPU: 3 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   21.583344] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.583359] Hardware name: Radxa ROCK Pi 4B (DT)
[   21.583377] Call trace:
[   21.583388]  show_stack+0x20/0x38 (C)
[   21.583423]  dump_stack_lvl+0x8c/0xd0
[   21.583454]  print_report+0x118/0x608
[   21.583485]  kasan_report+0xdc/0x128
[   21.583513]  kasan_check_range+0x100/0x1a8
[   21.583544]  __asan_memmove+0x3c/0x98
[   21.583575]  kmalloc_memmove_negative_size+0x154/0x2e0
[   21.583613]  kunit_try_run_case+0x170/0x3f0
[   21.583648]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.583688]  kthread+0x328/0x630
[   21.583723]  ret_from_fork+0x10/0x20
[   21.583756] 
[   21.589691] Allocated by task 234:
[   21.590018]  kasan_save_stack+0x3c/0x68
[   21.590393]  kasan_save_track+0x20/0x40
[   21.590765]  kasan_save_alloc_info+0x40/0x58
[   21.591179]  __kasan_kmalloc+0xd4/0xd8
[   21.591543]  __kmalloc_cache_noprof+0x15c/0x3c0
[   21.591984]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   21.592471]  kunit_try_run_case+0x170/0x3f0
[   21.592878]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.593404]  kthread+0x328/0x630
[   21.593727]  ret_from_fork+0x10/0x20
[   21.594078] 
[   21.594230] The buggy address belongs to the object at ffff00000fdabc00
[   21.594230]  which belongs to the cache kmalloc-64 of size 64
[   21.595348] The buggy address is located 4 bytes inside of
[   21.595348]  64-byte region [ffff00000fdabc00, ffff00000fdabc40)
[   21.596392] 
[   21.596546] The buggy address belongs to the physical page:
[   21.597062] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xfdab
[   21.597787] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   21.598399] page_type: f5(slab)
[   21.598713] raw: 03fffe0000000000 ffff0000004028c0 dead000000000122 0000000000000000
[   21.599429] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   21.600138] page dumped because: kasan: bad access detected
[   21.600652] 
[   21.600805] Memory state around the buggy address:
[   21.601253]  ffff00000fdabb00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   21.601920]  ffff00000fdabb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   21.602586] >ffff00000fdabc00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   21.603247]                    ^
[   21.603558]  ffff00000fdabc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.604224]  ffff00000fdabd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.604887] ==================================================================