Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.142158] ==================================================================
[   15.142245] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   15.142302] Read of size 1 at addr fff00000c3fc613f by task kunit_try_catch/138
[   15.142351] 
[   15.142382] CPU: 0 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.142478] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.142505] Hardware name: linux,dummy-virt (DT)
[   15.142628] Call trace:
[   15.142657]  show_stack+0x20/0x38 (C)
[   15.142717]  dump_stack_lvl+0x8c/0xd0
[   15.142771]  print_report+0x118/0x5d0
[   15.142817]  kasan_report+0xdc/0x128
[   15.142862]  __asan_report_load1_noabort+0x20/0x30
[   15.142911]  kmalloc_oob_left+0x2ec/0x320
[   15.142954]  kunit_try_run_case+0x170/0x3f0
[   15.143029]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.143082]  kthread+0x328/0x630
[   15.143122]  ret_from_fork+0x10/0x20
[   15.143169] 
[   15.143186] Allocated by task 26:
[   15.143371]  kasan_save_stack+0x3c/0x68
[   15.143488]  kasan_save_track+0x20/0x40
[   15.143525]  kasan_save_alloc_info+0x40/0x58
[   15.143640]  __kasan_kmalloc+0xd4/0xd8
[   15.143770]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   15.143814]  kstrdup+0x54/0xc8
[   15.143870]  devtmpfs_work_loop+0x6f8/0xa58
[   15.143910]  devtmpfsd+0x50/0x58
[   15.143943]  kthread+0x328/0x630
[   15.143973]  ret_from_fork+0x10/0x20
[   15.144007] 
[   15.144040] Freed by task 26:
[   15.144076]  kasan_save_stack+0x3c/0x68
[   15.144112]  kasan_save_track+0x20/0x40
[   15.144147]  kasan_save_free_info+0x4c/0x78
[   15.144188]  __kasan_slab_free+0x6c/0x98
[   15.144225]  kfree+0x214/0x3c8
[   15.144260]  devtmpfs_work_loop+0x804/0xa58
[   15.144573]  devtmpfsd+0x50/0x58
[   15.144611]  kthread+0x328/0x630
[   15.144744]  ret_from_fork+0x10/0x20
[   15.144803] 
[   15.144909] The buggy address belongs to the object at fff00000c3fc6120
[   15.144909]  which belongs to the cache kmalloc-16 of size 16
[   15.145020] The buggy address is located 15 bytes to the right of
[   15.145020]  allocated 16-byte region [fff00000c3fc6120, fff00000c3fc6130)
[   15.145177] 
[   15.145216] The buggy address belongs to the physical page:
[   15.145264] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fc6
[   15.145323] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.145387] page_type: f5(slab)
[   15.145425] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.145508] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.145548] page dumped because: kasan: bad access detected
[   15.145577] 
[   15.145594] Memory state around the buggy address:
[   15.145625]  fff00000c3fc6000: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   15.145676]  fff00000c3fc6080: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc
[   15.145854] >fff00000c3fc6100: 00 06 fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   15.145897]                                         ^
[   15.146066]  fff00000c3fc6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.146269]  fff00000c3fc6200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.146412] ==================================================================

[   11.605018] ==================================================================
[   11.605544] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   11.605885] Read of size 1 at addr ffff888101d1f4bf by task kunit_try_catch/155
[   11.606190] 
[   11.606300] CPU: 0 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   11.606343] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.606354] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.606375] Call Trace:
[   11.606386]  <TASK>
[   11.606402]  dump_stack_lvl+0x73/0xb0
[   11.606454]  print_report+0xd1/0x610
[   11.606476]  ? __virt_addr_valid+0x1db/0x2d0
[   11.606498]  ? kmalloc_oob_left+0x361/0x3c0
[   11.606517]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.606537]  ? kmalloc_oob_left+0x361/0x3c0
[   11.606557]  kasan_report+0x141/0x180
[   11.606578]  ? kmalloc_oob_left+0x361/0x3c0
[   11.606622]  __asan_report_load1_noabort+0x18/0x20
[   11.606644]  kmalloc_oob_left+0x361/0x3c0
[   11.606686]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   11.606707]  ? __schedule+0x10cc/0x2b60
[   11.606729]  ? __pfx_read_tsc+0x10/0x10
[   11.606749]  ? ktime_get_ts64+0x86/0x230
[   11.606772]  kunit_try_run_case+0x1a5/0x480
[   11.606796]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.606816]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.606838]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.606860]  ? __kthread_parkme+0x82/0x180
[   11.606879]  ? preempt_count_sub+0x50/0x80
[   11.606901]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.606931]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.606953]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.606974]  kthread+0x337/0x6f0
[   11.606993]  ? trace_preempt_on+0x20/0xc0
[   11.607014]  ? __pfx_kthread+0x10/0x10
[   11.607033]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.607053]  ? calculate_sigpending+0x7b/0xa0
[   11.607103]  ? __pfx_kthread+0x10/0x10
[   11.607123]  ret_from_fork+0x116/0x1d0
[   11.607140]  ? __pfx_kthread+0x10/0x10
[   11.607159]  ret_from_fork_asm+0x1a/0x30
[   11.607189]  </TASK>
[   11.607198] 
[   11.613766] Allocated by task 1:
[   11.613929]  kasan_save_stack+0x45/0x70
[   11.614129]  kasan_save_track+0x18/0x40
[   11.614328]  kasan_save_alloc_info+0x3b/0x50
[   11.614540]  __kasan_kmalloc+0xb7/0xc0
[   11.614727]  __kmalloc_node_track_caller_noprof+0x1cb/0x500
[   11.614996]  kvasprintf+0xc5/0x150
[   11.615184]  __kthread_create_on_node+0x18b/0x3a0
[   11.615374]  kthread_create_on_node+0xab/0xe0
[   11.615551]  cryptomgr_notify+0x704/0x9f0
[   11.615699]  notifier_call_chain+0xcb/0x250
[   11.615873]  blocking_notifier_call_chain+0x64/0x90
[   11.616123]  crypto_alg_mod_lookup+0x21f/0x440
[   11.616328]  crypto_alloc_tfm_node+0xc5/0x1f0
[   11.616515]  crypto_alloc_sig+0x23/0x30
[   11.616721]  public_key_verify_signature+0x208/0x9f0
[   11.616951]  x509_check_for_self_signed+0x2cb/0x480
[   11.617183]  x509_cert_parse+0x59c/0x830
[   11.617388]  x509_key_preparse+0x68/0x8a0
[   11.617577]  asymmetric_key_preparse+0xb1/0x160
[   11.617804]  __key_create_or_update+0x43d/0xcc0
[   11.618049]  key_create_or_update+0x17/0x20
[   11.618229]  x509_load_certificate_list+0x174/0x200
[   11.618449]  regulatory_init_db+0xee/0x3a0
[   11.618634]  do_one_initcall+0xd8/0x370
[   11.618849]  kernel_init_freeable+0x420/0x6f0
[   11.619006]  kernel_init+0x23/0x1e0
[   11.619136]  ret_from_fork+0x116/0x1d0
[   11.619266]  ret_from_fork_asm+0x1a/0x30
[   11.619402] 
[   11.619494] Freed by task 0:
[   11.619645]  kasan_save_stack+0x45/0x70
[   11.619861]  kasan_save_track+0x18/0x40
[   11.620068]  kasan_save_free_info+0x3f/0x60
[   11.620278]  __kasan_slab_free+0x56/0x70
[   11.620473]  kfree+0x222/0x3f0
[   11.620660]  free_kthread_struct+0xeb/0x150
[   11.620884]  free_task+0xf3/0x130
[   11.621078]  __put_task_struct+0x1c8/0x480
[   11.621280]  delayed_put_task_struct+0x10a/0x150
[   11.621501]  rcu_core+0x66f/0x1c40
[   11.621719]  rcu_core_si+0x12/0x20
[   11.621893]  handle_softirqs+0x209/0x730
[   11.622077]  __irq_exit_rcu+0xc9/0x110
[   11.622278]  irq_exit_rcu+0x12/0x20
[   11.622423]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.622588]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.622842] 
[   11.622955] The buggy address belongs to the object at ffff888101d1f4a0
[   11.622955]  which belongs to the cache kmalloc-16 of size 16
[   11.623485] The buggy address is located 15 bytes to the right of
[   11.623485]  allocated 16-byte region [ffff888101d1f4a0, ffff888101d1f4b0)
[   11.624000] 
[   11.624096] The buggy address belongs to the physical page:
[   11.624349] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d1f
[   11.624620] flags: 0x200000000000000(node=0|zone=2)
[   11.624809] page_type: f5(slab)
[   11.624937] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   11.625278] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   11.625616] page dumped because: kasan: bad access detected
[   11.625886] 
[   11.626009] Memory state around the buggy address:
[   11.626213]  ffff888101d1f380: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   11.626428]  ffff888101d1f400: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc
[   11.626641] >ffff888101d1f480: fa fb fc fc fa fb fc fc 00 07 fc fc fc fc fc fc
[   11.626961]                                         ^
[   11.627199]  ffff888101d1f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.627504]  ffff888101d1f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.627832] ==================================================================