llcp: llcp_sock_bind: sk ffff888049e9f000 addr ffffc900033f7df8 family 39 ================================================================== BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:648 [inline] BUG: KASAN: slab-out-of-bounds in string+0x471/0x4d0 lib/vsprintf.c:730 Read of size 1 at addr ffff888028d09801 by task syz.0.1856/12875 CPU: 1 UID: 0 PID: 12875 Comm: syz.0.1856 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 string_nocheck lib/vsprintf.c:648 [inline] string+0x471/0x4d0 lib/vsprintf.c:730 vsnprintf+0x422/0x1300 lib/vsprintf.c:2949 va_format+0x14e/0x4b0 lib/vsprintf.c:1725 pointer+0x929/0xe50 lib/vsprintf.c:2577 vsnprintf+0x649/0x1300 lib/vsprintf.c:2953 vprintk_store+0x3b3/0xbe0 kernel/printk/printk.c:2307 vprintk_emit+0x139/0x6b0 kernel/printk/printk.c:2455 _printk+0xcf/0x110 kernel/printk/printk.c:2504 __dynamic_pr_debug+0x201/0x270 lib/dynamic_debug.c:879 nfc_llcp_wks_sap net/nfc/llcp_core.c:344 [inline] nfc_llcp_get_sdp_ssap+0x32d/0x4c0 net/nfc/llcp_core.c:420 llcp_sock_bind+0x3c0/0x720 net/nfc/llcp_sock.c:114 __sys_bind_socket net/socket.c:1945 [inline] __sys_bind_socket net/socket.c:1937 [inline] __sys_bind+0x1a9/0x260 net/socket.c:1976 __do_sys_bind net/socket.c:1981 [inline] __se_sys_bind net/socket.c:1979 [inline] __x64_sys_bind+0x72/0xb0 net/socket.c:1979 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f926819e159 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:00007f9269110028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00007f9268425fa0 RCX: 00007f926819e159 RDX: 0000000000000060 RSI: 0000200000000080 RDI: 000000000000000c RBP: 00007f926823506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9268426038 R14: 00007f9268425fa0 R15: 00007ffcbaf0f5e8 Allocated by task 12875: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_node_track_caller_noprof+0x33d/0x870 mm/slub.c:5545 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:715 [inline] llcp_sock_bind+0x37c/0x720 net/nfc/llcp_sock.c:107 __sys_bind_socket net/socket.c:1945 [inline] __sys_bind_socket net/socket.c:1937 [inline] __sys_bind+0x1a9/0x260 net/socket.c:1976 __do_sys_bind net/socket.c:1981 [inline] __se_sys_bind net/socket.c:1979 [inline] __x64_sys_bind+0x72/0xb0 net/socket.c:1979 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888028d09800 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 [ffff888028d09800, ffff888028d09801) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28d09 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c034500 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000800080 00000000f5000000 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 165, tgid 165 (kworker/u8:5), ts 4811547264 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7417 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_node_track_caller_noprof+0x6a8/0x870 mm/slub.c:5545 kvasprintf+0xbc/0x150 lib/kasprintf.c:25 kvasprintf_const+0x66/0x1a0 lib/kasprintf.c:49 kobject_set_name_vargs+0x5a/0x140 lib/kobject.c:274 dev_set_name+0xc7/0x100 drivers/base/core.c:3564 scsi_sysfs_device_initialize+0x3b6/0xa60 drivers/scsi/scsi_sysfs.c:1697 scsi_alloc_sdev+0xa4a/0xe90 drivers/scsi/scsi_scan.c:350 scsi_probe_and_add_lun+0x555/0xd30 drivers/scsi/scsi_scan.c:1228 __scsi_scan_target+0x1a3/0x4b0 drivers/scsi/scsi_scan.c:1805 scsi_scan_channel drivers/scsi/scsi_scan.c:1895 [inline] scsi_scan_channel+0x142/0x1e0 drivers/scsi/scsi_scan.c:1870 page last free pid 2 tgid 2 ts 4811277088 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 __kasan_populate_vmalloc_do mm/kasan/shadow.c:393 [inline] __kasan_populate_vmalloc+0x1ea/0x210 mm/kasan/shadow.c:424 kasan_populate_vmalloc include/linux/kasan.h:580 [inline] alloc_vmap_area+0x95d/0x2bb0 mm/vmalloc.c:2145 __get_vm_area_node+0x1ed/0x350 mm/vmalloc.c:3248 __vmalloc_node_range_noprof+0x268/0x1420 mm/vmalloc.c:4064 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4165 alloc_thread_stack_node kernel/fork.c:359 [inline] dup_task_struct kernel/fork.c:930 [inline] copy_process+0x803/0x8370 kernel/fork.c:2133 kernel_clone+0x176/0x9d0 kernel/fork.c:2769 kernel_thread+0xdb/0x120 kernel/fork.c:2830 create_kthread kernel/kthread.c:459 [inline] kthreadd+0x498/0x7a0 kernel/kthread.c:817 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888028d09700: 05 fc fc fc 00 fc fc fc fa fc fc fc 05 fc fc fc ffff888028d09780: fa fc fc fc 00 fc fc fc fa fc fc fc fa fc fc fc >ffff888028d09800: 01 fc fc fc 05 fc fc fc fa fc fc fc 06 fc fc fc ^ ffff888028d09880: fa fc fc fc 04 fc fc fc 06 fc fc fc 06 fc fc fc ffff888028d09900: 06 fc fc fc 06 fc fc fc 06 fc fc fc 06 fc fc fc ==================================================================