llcp: llcp_sock_bind: sk ffff88803051a000 addr ffffc90006b0fdc0 family 39
==================================================================
BUG: KASAN: slab-out-of-bounds in string+0x216/0x2d0
Read of size 1 at addr ffff8880229b3b01 by task syz.3.14107/9297

CPU: 0 UID: 0 PID: 9297 Comm: syz.3.14107 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 string+0x216/0x2d0
 vsnprintf+0x74a/0xef0
 pointer+0xa12/0x1120
 vsnprintf+0x626/0xef0
 vprintk_store+0x3be/0xd90
 vprintk_emit+0x192/0x560
 _printk+0xdd/0x130
 __dynamic_pr_debug+0x1a2/0x260
 nfc_llcp_get_sdp_ssap+0x3a7/0x440
 llcp_sock_bind+0x3c5/0x780
 __sys_bind+0x2e3/0x410
 __x64_sys_bind+0x7a/0x90
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1ac3b9e159
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:00007f1ac4aac028 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00007f1ac3e25fa0 RCX: 00007f1ac3b9e159
RDX: 0000000000000060 RSI: 0000200000000080 RDI: 0000000000000004
RBP: 00007f1ac3c3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1ac3e26038 R14: 00007f1ac3e25fa0 R15: 00007ffc25437e48
 </TASK>

Allocated by task 9297:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_node_track_caller_noprof+0x4b4/0x720
 kmemdup_noprof+0x2b/0x70
 llcp_sock_bind+0x377/0x780
 __sys_bind+0x2e3/0x410
 __x64_sys_bind+0x7a/0x90
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8880229b3b00
 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 [ffff8880229b3b00, ffff8880229b3b01)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880229b3200 pfn:0x229b3
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff888100041500 ffff888100040348 ffffea0000dd3b90
raw: ffff8880229b3200 000000000080004b 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 9481, tgid 9480 (syz.1.1342), ts 172029102791
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2209/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 __kmalloc_node_track_caller_noprof+0x548/0x720
 kstrdup+0x42/0x100
 __kernfs_new_node+0xa9/0x980
 kernfs_new_node+0xea/0x140
 __kernfs_create_file+0x4b/0x2e0
 sysfs_add_file_mode_ns+0x237/0x300
 internal_create_group+0x679/0x1180
 sysfs_create_groups+0x59/0x120
 ib_setup_port_attrs+0x1774/0x2420
 add_one_compat_dev+0x446/0x650
page last free pid 9474 tgid 9473 ts 171999051318 stack trace:
 __free_frozen_pages+0xc93/0xd90
 kimage_alloc_control_pages+0xacd/0xbd0
 do_kexec_load+0x492/0x7c0
 __se_sys_kexec_load+0x134/0x160
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8880229b3a00: 05 fc fc fc 06 fc fc fc 05 fc fc fc 05 fc fc fc
 ffff8880229b3a80: 05 fc fc fc 05 fc fc fc fa fc fc fc 05 fc fc fc
>ffff8880229b3b00: 01 fc fc fc fa fc fc fc 05 fc fc fc 05 fc fc fc
                   ^
 ffff8880229b3b80: 06 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc
 ffff8880229b3c00: fa fc fc fc fa fc fc fc fa fc fc fc 06 fc fc fc
==================================================================
