KASAN: slab-out-of-bounds Read in __dynamic_pr_debug

Status: upstream: reported on 2026/09/16 06:54
Reported-by: syzbot+bf5d3c048e61b09c026e@syzkaller.appspotmail.com
First crash: 14d, last: 1d07h
▶ ▼ Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in __dynamic_pr_debug prio:high net nfc 17 syz, C 436 1h01m 42d 21/29 upstream: reported C repro on 2026/08/19 05:22
linux-5.15 KASAN: slab-out-of-bounds Read in __dynamic_pr_debug 17 syz, C 35 2h36m 14d 0/3 upstream: reported C repro on 2026/09/16 06:37
linux-6.1 KASAN: slab-out-of-bounds Read in __dynamic_pr_debug 17 syz, C 14 16h19m 12d 0/3 upstream: reported C repro on 2026/09/18 02:35

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:645 [inline]
BUG: KASAN: slab-out-of-bounds in string+0x204/0x290 lib/vsprintf.c:727
Read of size 1 at addr ffff88814d417079 by task syz.7.1916/12837

CPU: 0 PID: 12837 Comm: syz.7.1916 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 string_nocheck lib/vsprintf.c:645 [inline]
 string+0x204/0x290 lib/vsprintf.c:727
 vsnprintf+0xf72/0x1ba0 lib/vsprintf.c:2823
 va_format lib/vsprintf.c:1682 [inline]
 pointer+0x9ed/0x1150 lib/vsprintf.c:2454
 vsnprintf+0xdaa/0x1ba0 lib/vsprintf.c:2827
 vprintk_store+0x3d9/0xd50 kernel/printk/printk.c:2226
 vprintk_emit+0x117/0x610 kernel/printk/printk.c:2322
 _printk+0xde/0x130 kernel/printk/printk.c:2366
 __dynamic_pr_debug+0x1a3/0x260 lib/dynamic_debug.c:879
 nfc_llcp_wks_sap net/nfc/llcp_core.c:342 [inline]
 nfc_llcp_get_sdp_ssap+0x3a4/0x3d0 net/nfc/llcp_core.c:418
 llcp_sock_bind+0x3be/0x710 net/nfc/llcp_sock.c:114
 __sys_bind+0x2f0/0x3f0 net/socket.c:1856
 __do_sys_bind net/socket.c:1867 [inline]
 __se_sys_bind net/socket.c:1865 [inline]
 __x64_sys_bind+0x7a/0x90 net/socket.c:1865
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7efd9319e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007efd94118028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00007efd93425fa0 RCX: 00007efd9319e159
RDX: 0000000000000060 RSI: 0000200000000080 RDI: 0000000000000004
RBP: 00007efd9323506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efd93426038 R14: 00007efd93425fa0 R15: 00007ffce1c15808
 </TASK>

Allocated by task 12837:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:198 [inline]
 __do_kmalloc_node mm/slab_common.c:1007 [inline]
 __kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027
 kmemdup+0x2b/0x70 mm/util.c:131
 kmemdup include/linux/fortify-string.h:779 [inline]
 llcp_sock_bind+0x370/0x710 net/nfc/llcp_sock.c:107
 __sys_bind+0x2f0/0x3f0 net/socket.c:1856
 __do_sys_bind net/socket.c:1867 [inline]
 __se_sys_bind net/socket.c:1865 [inline]
 __x64_sys_bind+0x7a/0x90 net/socket.c:1865
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88814d417078
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes to the right of
 allocated 1-byte region [ffff88814d417078, ffff88814d417079)

The buggy address belongs to the physical page:
page:ffffea00053505c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14d417
flags: 0x57ff00000000800(slab|node=1|zone=2|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 057ff00000000800 ffff888017c41280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 26426769946, free_ts 0
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
 prep_new_page mm/page_alloc.c:1589 [inline]
 get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2118
 alloc_slab_page+0x5d/0x180 mm/slub.c:1881
 allocate_slab mm/slub.c:2028 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2081
 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
 __slab_alloc mm/slub.c:3339 [inline]
 __slab_alloc_node mm/slub.c:3392 [inline]
 slab_alloc_node mm/slub.c:3485 [inline]
 __kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534
 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
 kmalloc include/linux/slab.h:600 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 add_sysfs_param+0x5fb/0x940 kernel/params.c:638
 kernel_add_sysfs_param+0xaf/0x120 kernel/params.c:799
 param_sysfs_builtin+0x1fd/0x2b0 kernel/params.c:838
 param_sysfs_builtin_init+0x2d/0x30 kernel/params.c:974
 do_one_initcall+0x242/0x790 init/main.c:1210
 do_initcall_level+0x13d/0x1f0 init/main.c:1272
 do_initcalls+0x69/0xd0 init/main.c:1288
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88814d416f00: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
 ffff88814d416f80: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc
>ffff88814d417000: 02 fc fc fc fc 00 fc fc fc fc fa fc fc fc fc 01
                                                                ^
 ffff88814d417080: fc fc fc fc 00 fc fc fc fc fb fc fc fc fc fa fc
 ffff88814d417100: fc fc fc fa fc fc fc fc 05 fc fc fc fc 05 fc fc
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/29 04:38 linux-6.6.y 79643295eba1 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/29 04:38 linux-6.6.y 79643295eba1 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/22 17:17 linux-6.6.y 79643295eba1 e12281bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/22 17:13 linux-6.6.y 79643295eba1 e12281bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/22 17:13 linux-6.6.y 79643295eba1 e12281bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/18 09:36 linux-6.6.y 79643295eba1 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/18 09:36 linux-6.6.y 79643295eba1 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/18 01:05 linux-6.6.y 79643295eba1 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/17 00:12 linux-6.6.y 79643295eba1 95928915 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/17 00:12 linux-6.6.y 79643295eba1 95928915 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
2026/09/16 06:53 linux-6.6.y 79643295eba1 12a0a44a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-out-of-bounds Read in __dynamic_pr_debug
* Struck through repros no longer work on HEAD.