Hay
Date
June 18, 2025, 6:43 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.705248] ==================================================================
[   19.705385] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   19.705572] Read of size 1 at addr fff00000c60580bf by task kunit_try_catch/148
[   19.705673] 
[   19.705742] CPU: 0 UID: 0 PID: 148 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT 
[   19.705951] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.706035] Hardware name: linux,dummy-virt (DT)
[   19.706131] Call trace:
[   19.706203]  show_stack+0x20/0x38 (C)
[   19.706337]  dump_stack_lvl+0x8c/0xd0
[   19.706479]  print_report+0x118/0x608
[   19.706613]  kasan_report+0xdc/0x128
[   19.706755]  __asan_report_load1_noabort+0x20/0x30
[   19.707079]  kmalloc_oob_left+0x2ec/0x320
[   19.707202]  kunit_try_run_case+0x170/0x3f0
[   19.707304]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.707419]  kthread+0x328/0x630
[   19.707856]  ret_from_fork+0x10/0x20
[   19.707978] 
[   19.708026] Allocated by task 9:
[   19.708090]  kasan_save_stack+0x3c/0x68
[   19.708171]  kasan_save_track+0x20/0x40
[   19.708253]  kasan_save_alloc_info+0x40/0x58
[   19.708337]  __kasan_kmalloc+0xd4/0xd8
[   19.708412]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   19.708505]  kvasprintf+0xe0/0x180
[   19.708596]  __kthread_create_on_node+0x16c/0x350
[   19.708682]  kthread_create_on_node+0xe4/0x130
[   19.708760]  create_worker+0x380/0x6b8
[   19.709485]  worker_thread+0x808/0xf38
[   19.709593]  kthread+0x328/0x630
[   19.709664]  ret_from_fork+0x10/0x20
[   19.709736] 
[   19.709776] The buggy address belongs to the object at fff00000c60580a0
[   19.709776]  which belongs to the cache kmalloc-16 of size 16
[   19.710110] The buggy address is located 19 bytes to the right of
[   19.710110]  allocated 12-byte region [fff00000c60580a0, fff00000c60580ac)
[   19.710514] 
[   19.710559] The buggy address belongs to the physical page:
[   19.710620] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106058
[   19.710715] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.710816] page_type: f5(slab)
[   19.710894] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.711863] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   19.712044] page dumped because: kasan: bad access detected
[   19.712317] 
[   19.712652] Memory state around the buggy address:
[   19.712752]  fff00000c6057f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.712850]  fff00000c6058000: 00 00 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   19.712985] >fff00000c6058080: fa fb fc fc 00 04 fc fc 00 07 fc fc fc fc fc fc
[   19.713105]                                         ^
[   19.713179]  fff00000c6058100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.713299]  fff00000c6058180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.713397] ==================================================================

[   10.503356] ==================================================================
[   10.504434] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   10.504679] Read of size 1 at addr ffff888101677b9f by task kunit_try_catch/164
[   10.504933] 
[   10.505250] CPU: 0 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) 
[   10.505304] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.505316] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.505337] Call Trace:
[   10.505350]  <TASK>
[   10.505368]  dump_stack_lvl+0x73/0xb0
[   10.505399]  print_report+0xd1/0x650
[   10.505419]  ? __virt_addr_valid+0x1db/0x2d0
[   10.505443]  ? kmalloc_oob_left+0x361/0x3c0
[   10.505462]  ? kasan_complete_mode_report_info+0x64/0x200
[   10.505486]  ? kmalloc_oob_left+0x361/0x3c0
[   10.505505]  kasan_report+0x141/0x180
[   10.505525]  ? kmalloc_oob_left+0x361/0x3c0
[   10.505549]  __asan_report_load1_noabort+0x18/0x20
[   10.505571]  kmalloc_oob_left+0x361/0x3c0
[   10.505590]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   10.505610]  ? __schedule+0x10cc/0x2b60
[   10.505631]  ? __pfx_read_tsc+0x10/0x10
[   10.505651]  ? ktime_get_ts64+0x86/0x230
[   10.505676]  kunit_try_run_case+0x1a5/0x480
[   10.505698]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.505718]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.505740]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.505761]  ? __kthread_parkme+0x82/0x180
[   10.505780]  ? preempt_count_sub+0x50/0x80
[   10.505802]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.505823]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.505844]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.505866]  kthread+0x337/0x6f0
[   10.505883]  ? trace_preempt_on+0x20/0xc0
[   10.505918]  ? __pfx_kthread+0x10/0x10
[   10.505937]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.505955]  ? calculate_sigpending+0x7b/0xa0
[   10.505989]  ? __pfx_kthread+0x10/0x10
[   10.506009]  ret_from_fork+0x116/0x1d0
[   10.506026]  ? __pfx_kthread+0x10/0x10
[   10.506045]  ret_from_fork_asm+0x1a/0x30
[   10.506074]  </TASK>
[   10.506084] 
[   10.513701] Allocated by task 26:
[   10.513855]  kasan_save_stack+0x45/0x70
[   10.513992]  kasan_save_track+0x18/0x40
[   10.514119]  kasan_save_alloc_info+0x3b/0x50
[   10.514320]  __kasan_kmalloc+0xb7/0xc0
[   10.514498]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   10.514802]  kstrdup+0x3e/0xa0
[   10.515065]  devtmpfs_work_loop+0x96d/0xf30
[   10.515477]  devtmpfsd+0x3b/0x40
[   10.516016]  kthread+0x337/0x6f0
[   10.516163]  ret_from_fork+0x116/0x1d0
[   10.516352]  ret_from_fork_asm+0x1a/0x30
[   10.517780] 
[   10.518004] Freed by task 26:
[   10.518179]  kasan_save_stack+0x45/0x70
[   10.518618]  kasan_save_track+0x18/0x40
[   10.518768]  kasan_save_free_info+0x3f/0x60
[   10.519100]  __kasan_slab_free+0x56/0x70
[   10.519321]  kfree+0x222/0x3f0
[   10.519706]  devtmpfs_work_loop+0xacb/0xf30
[   10.519915]  devtmpfsd+0x3b/0x40
[   10.520259]  kthread+0x337/0x6f0
[   10.520429]  ret_from_fork+0x116/0x1d0
[   10.520737]  ret_from_fork_asm+0x1a/0x30
[   10.521001] 
[   10.521169] The buggy address belongs to the object at ffff888101677b80
[   10.521169]  which belongs to the cache kmalloc-16 of size 16
[   10.521946] The buggy address is located 15 bytes to the right of
[   10.521946]  allocated 16-byte region [ffff888101677b80, ffff888101677b90)
[   10.522751] 
[   10.522910] The buggy address belongs to the physical page:
[   10.523136] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101677
[   10.523828] flags: 0x200000000000000(node=0|zone=2)
[   10.524169] page_type: f5(slab)
[   10.524307] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   10.524798] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   10.525279] page dumped because: kasan: bad access detected
[   10.525530] 
[   10.525615] Memory state around the buggy address:
[   10.525786]  ffff888101677a80: 00 00 fc fc 00 04 fc fc 00 04 fc fc fa fb fc fc
[   10.526096]  ffff888101677b00: fa fb fc fc 00 05 fc fc fa fb fc fc fa fb fc fc
[   10.526840] >ffff888101677b80: fa fb fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   10.527550]                             ^
[   10.527725]  ffff888101677c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.528385]  ffff888101677c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.528945] ==================================================================