Hay
Date
March 19, 2025, 10:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.349940] ==================================================================
[   33.350189] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   33.350340] Read of size 1 at addr fff00000c5c8ef9f by task kunit_try_catch/140
[   33.350497] 
[   33.350587] CPU: 1 UID: 0 PID: 140 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT 
[   33.350847] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.350941] Hardware name: linux,dummy-virt (DT)
[   33.351040] Call trace:
[   33.351154]  show_stack+0x20/0x38 (C)
[   33.351303]  dump_stack_lvl+0x8c/0xd0
[   33.351562]  print_report+0x118/0x5f0
[   33.351744]  kasan_report+0xc8/0x118
[   33.351988]  __asan_report_load1_noabort+0x20/0x30
[   33.352162]  kmalloc_oob_left+0x2ec/0x320
[   33.352316]  kunit_try_run_case+0x14c/0x3d0
[   33.352531]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.352857]  kthread+0x318/0x618
[   33.353117]  ret_from_fork+0x10/0x20
[   33.353270] 
[   33.353362] Allocated by task 26:
[   33.353448]  kasan_save_stack+0x3c/0x68
[   33.353674]  kasan_save_track+0x20/0x40
[   33.353860]  kasan_save_alloc_info+0x40/0x58
[   33.354066]  __kasan_kmalloc+0xd4/0xd8
[   33.354227]  __kmalloc_node_track_caller_noprof+0x184/0x4b8
[   33.354398]  kstrdup+0x54/0xc8
[   33.354532]  devtmpfs_work_loop+0x38c/0x5a0
[   33.354703]  devtmpfsd+0x50/0x58
[   33.354835]  kthread+0x318/0x618
[   33.355025]  ret_from_fork+0x10/0x20
[   33.355154] 
[   33.355235] Freed by task 26:
[   33.355465]  kasan_save_stack+0x3c/0x68
[   33.355603]  kasan_save_track+0x20/0x40
[   33.355719]  kasan_save_free_info+0x4c/0x78
[   33.355856]  __kasan_slab_free+0x6c/0x98
[   33.356021]  kfree+0x214/0x3c8
[   33.356194]  devtmpfs_work_loop+0x484/0x5a0
[   33.356340]  devtmpfsd+0x50/0x58
[   33.356472]  kthread+0x318/0x618
[   33.356594]  ret_from_fork+0x10/0x20
[   33.356907] 
[   33.357164] The buggy address belongs to the object at fff00000c5c8ef80
[   33.357164]  which belongs to the cache kmalloc-16 of size 16
[   33.357572] The buggy address is located 15 bytes to the right of
[   33.357572]  allocated 16-byte region [fff00000c5c8ef80, fff00000c5c8ef90)
[   33.357770] 
[   33.357832] The buggy address belongs to the physical page:
[   33.358708] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105c8e
[   33.358901] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.359086] page_type: f5(slab)
[   33.359197] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   33.359356] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   33.359490] page dumped because: kasan: bad access detected
[   33.359590] 
[   33.359647] Memory state around the buggy address:
[   33.359744]  fff00000c5c8ee80: 00 04 fc fc fa fb fc fc 00 05 fc fc 00 05 fc fc
[   33.359880]  fff00000c5c8ef00: 00 00 fc fc 00 06 fc fc 00 06 fc fc 00 00 fc fc
[   33.361000] >fff00000c5c8ef80: fa fb fc fc 00 07 fc fc fc fc fc fc fc fc fc fc
[   33.361348]                             ^
[   33.362129]  fff00000c5c8f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.362294]  fff00000c5c8f080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
[   33.362408] ==================================================================

[   20.406017] ==================================================================
[   20.407049] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   20.407686] Read of size 1 at addr ffff888100a7a95f by task kunit_try_catch/159
[   20.408531] 
[   20.408798] CPU: 0 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) 
[   20.408920] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.408951] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.408982] Call Trace:
[   20.409001]  <TASK>
[   20.409022]  dump_stack_lvl+0x73/0xb0
[   20.409067]  print_report+0xd1/0x660
[   20.409140]  ? __virt_addr_valid+0x1db/0x2d0
[   20.409260]  ? kasan_complete_mode_report_info+0x2a/0x200
[   20.409329]  kasan_report+0x104/0x140
[   20.409388]  ? kmalloc_oob_left+0x361/0x3c0
[   20.409453]  ? kmalloc_oob_left+0x361/0x3c0
[   20.409525]  __asan_report_load1_noabort+0x18/0x20
[   20.409561]  kmalloc_oob_left+0x361/0x3c0
[   20.409595]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   20.409629]  ? __schedule+0xd46/0x29c0
[   20.409662]  ? __pfx_read_tsc+0x10/0x10
[   20.409693]  ? ktime_get_ts64+0x86/0x240
[   20.410197]  kunit_try_run_case+0x1b2/0x490
[   20.410293]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.410341]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   20.410377]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.410410]  ? __kthread_parkme+0x82/0x160
[   20.410444]  ? preempt_count_sub+0x50/0x80
[   20.410480]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.410514]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.410547]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.410580]  kthread+0x323/0x710
[   20.410610]  ? trace_preempt_on+0x20/0xc0
[   20.410645]  ? __pfx_kthread+0x10/0x10
[   20.410676]  ? _raw_spin_unlock_irq+0x47/0x80
[   20.410726]  ? calculate_sigpending+0x7b/0xa0
[   20.410804]  ? __pfx_kthread+0x10/0x10
[   20.410839]  ret_from_fork+0x41/0x80
[   20.410871]  ? __pfx_kthread+0x10/0x10
[   20.410903]  ret_from_fork_asm+0x1a/0x30
[   20.410952]  </TASK>
[   20.410967] 
[   20.423426] Allocated by task 11:
[   20.423876]  kasan_save_stack+0x3d/0x60
[   20.424339]  kasan_save_track+0x18/0x40
[   20.424848]  kasan_save_alloc_info+0x3b/0x50
[   20.425322]  __kasan_kmalloc+0xb7/0xc0
[   20.425589]  __kmalloc_node_track_caller_noprof+0x1c5/0x500
[   20.426139]  kvasprintf+0xc5/0x170
[   20.427455]  __kthread_create_on_node+0x18b/0x3a0
[   20.428007]  kthread_create_on_node+0xa7/0xe0
[   20.428480]  create_worker+0x3c6/0x7a0
[   20.428820]  worker_thread+0x947/0x12a0
[   20.431096]  kthread+0x323/0x710
[   20.431446]  ret_from_fork+0x41/0x80
[   20.431945]  ret_from_fork_asm+0x1a/0x30
[   20.432350] 
[   20.432562] The buggy address belongs to the object at ffff888100a7a940
[   20.432562]  which belongs to the cache kmalloc-16 of size 16
[   20.434500] The buggy address is located 19 bytes to the right of
[   20.434500]  allocated 12-byte region [ffff888100a7a940, ffff888100a7a94c)
[   20.435448] 
[   20.436345] The buggy address belongs to the physical page:
[   20.436772] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a7a
[   20.437401] flags: 0x200000000000000(node=0|zone=2)
[   20.438241] page_type: f5(slab)
[   20.438808] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   20.439331] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   20.440341] page dumped because: kasan: bad access detected
[   20.441082] 
[   20.441326] Memory state around the buggy address:
[   20.442133]  ffff888100a7a800: 00 05 fc fc 00 02 fc fc 00 03 fc fc fa fb fc fc
[   20.442868]  ffff888100a7a880: 00 02 fc fc 00 05 fc fc 00 02 fc fc 00 02 fc fc
[   20.443794] >ffff888100a7a900: 00 02 fc fc 00 02 fc fc 00 04 fc fc 00 07 fc fc
[   20.444436]                                                     ^
[   20.445598]  ffff888100a7a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.446126]  ffff888100a7aa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.446751] ==================================================================