netlink: 4 bytes leftover after parsing attributes in process `syz.9.705'.
netlink: 4 bytes leftover after parsing attributes in process `syz.9.705'.
netlink: 4 bytes leftover after parsing attributes in process `syz.9.705'.
==================================================================
BUG: KASAN: slab-out-of-bounds in get_device_parent+0x71/0x410 drivers/base/core.c:3269
Read of size 8 at addr ffff88811d91c300 by task syz.9.705/2932
CPU: 1 PID: 2932 Comm: syz.9.705 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x71/0x200 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:420
kasan_report+0x122/0x150 mm/kasan/report.c:524
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
get_device_parent+0x71/0x410 drivers/base/core.c:3269
device_add+0x308/0xec0 drivers/base/core.c:3619
device_create_groups_vargs drivers/base/core.c:4392 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4434
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36
create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44
function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652
configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f127979e559
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:00007f127a704028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1279a25fa0 RCX: 00007f127979e559
RDX: 00000000000001ff RSI: 0000200000000940 RDI: ffffffffffffff9c
RBP: 00007f1279835ab8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1279a26038 R14: 00007f1279a25fa0 R15: 00007fff0edfd1d8
Allocated by task 1056:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:380 [inline]
__kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:212 [inline]
__do_kmalloc_node mm/slab_common.c:938 [inline]
__kmalloc+0xb4/0x1e0 mm/slab_common.c:951
kmalloc include/linux/slab.h:568 [inline]
kzalloc include/linux/slab.h:699 [inline]
__register_sysctl_table+0xd9/0xe50 fs/proc/proc_sysctl.c:1345
register_net_sysctl+0x23f/0x250 net/sysctl_net.c:169
neigh_sysctl_register+0x9a0/0xa80 net/core/neighbour.c:3860
devinet_sysctl_register+0xaf/0x1e0 net/ipv4/devinet.c:2649
inetdev_init+0x2ca/0x510 net/ipv4/devinet.c:280
inetdev_event+0x1f4/0x10a0 net/ipv4/devinet.c:1547
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
call_netdevice_notifiers_info net/core/dev.c:2022 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2060 [inline]
call_netdevice_notifiers+0x119/0x190 net/core/dev.c:2074
register_netdevice+0x1186/0x1550 net/core/dev.c:10239
veth_newlink+0x8ba/0xd60 drivers/net/veth.c:1776
rtnl_newlink_create net/core/rtnetlink.c:3426 [inline]
__rtnl_newlink net/core/rtnetlink.c:3646 [inline]
rtnl_newlink+0x14dc/0x20d0 net/core/rtnetlink.c:3659
rtnetlink_rcv_msg+0xb28/0xde0 net/core/rtnetlink.c:6154
netlink_rcv_skb+0x200/0x450 net/netlink/af_netlink.c:2526
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6172
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1878
sock_sendmsg_nosec net/socket.c:716 [inline]
__sock_sendmsg net/socket.c:728 [inline]
__sys_sendto+0x4ac/0x660 net/socket.c:2143
__do_sys_sendto net/socket.c:2155 [inline]
__se_sys_sendto net/socket.c:2151 [inline]
__x64_sys_sendto+0xe5/0x100 net/socket.c:2151
x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff88811d91c000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 768 bytes inside of
1024-byte region [ffff88811d91c000, ffff88811d91c400)
The buggy address belongs to the physical page:
page:ffffea0004764600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811d91d000 pfn:0x11d918
head:ffffea0004764600 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004c56408 ffffea00044f1808 ffff888100043080
raw: ffff88811d91d000 0000000000100009 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 92, tgid 92 (klogd), ts 6968206812, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
__kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
__do_kmalloc_node mm/slab_common.c:937 [inline]
__kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
kmalloc_reserve net/core/skbuff.c:449 [inline]
__alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
alloc_skb include/linux/skbuff.h:1322 [inline]
alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6176
sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2770
unix_dgram_sendmsg+0x5c1/0x1710 net/unix/af_unix.c:1949
sock_sendmsg_nosec net/socket.c:716 [inline]
__sock_sendmsg net/socket.c:728 [inline]
__sys_sendto+0x4ac/0x660 net/socket.c:2143
__do_sys_sendto net/socket.c:2155 [inline]
__se_sys_sendto net/socket.c:2151 [inline]
__x64_sys_sendto+0xe5/0x100 net/socket.c:2151
page_owner free stack trace missing
Memory state around the buggy address:
ffff88811d91c200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
ffff88811d91c280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811d91c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88811d91c380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811d91c400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 0 PID: 2932 Comm: syz.9.705 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:idr_alloc_cyclic+0xa3/0x5f0 lib/idr.c:121
Code: 01 01 01 01 4b 89 44 2e 08 43 c7 44 2e 10 f3 f3 f3 f3 e8 30 5a 83 fc 49 8d 4c 24 14 48 89 4c 24 28 48 c1 e9 03 48 89 4c 24 58 <42> 0f b6 04 29 84 c0 0f 85 39 04 00 00 45 8b 6c 24 14 31 ff 89 de
RSP: 0018:ffffc9000e5f74c0 EFLAGS: 00010203
RAX: ffffffff84ee1410 RBX: 0000000000000000 RCX: 0000000000000004
RDX: ffffc900016da000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc9000e5f7610 R08: 0000000000000a20 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52001cbeeb4 R12: 0000000000000010
R13: dffffc0000000000 R14: 1ffff92001cbeea4 R15: 0000000000000001
FS: 00007f127a7046c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd9e3d58060 CR3: 0000000142193000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__kernfs_new_node+0x130/0x670 fs/kernfs/dir.c:620
kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:690
kernfs_create_dir_ns+0x47/0x130 fs/kernfs/dir.c:1046
sysfs_create_dir_ns+0x128/0x290 fs/sysfs/dir.c:59
create_dir lib/kobject.c:63 [inline]
kobject_add_internal+0x718/0xc20 lib/kobject.c:231
kobject_add_varg lib/kobject.c:366 [inline]
kobject_add+0x165/0x230 lib/kobject.c:418
class_dir_create_and_add drivers/base/core.c:3235 [inline]
get_device_parent+0x3a6/0x410 drivers/base/core.c:3290
device_add+0x308/0xec0 drivers/base/core.c:3619
device_create_groups_vargs drivers/base/core.c:4392 [inline]
device_create+0x26c/0x300 drivers/base/core.c:4434
create_function_device+0x60/0x70 drivers/usb/gadget/configfs.c:36
create_alsa_device drivers/usb/gadget/function/f_midi.c:1306 [inline]
f_midi_alloc_inst+0x1a8/0x380 drivers/usb/gadget/function/f_midi.c:1347
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xf3/0x310 drivers/usb/gadget/functions.c:44
function_make+0x118/0x360 drivers/usb/gadget/configfs.c:652
configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f127979e559
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:00007f127a704028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f1279a25fa0 RCX: 00007f127979e559
RDX: 00000000000001ff RSI: 0000200000000940 RDI: ffffffffffffff9c
RBP: 00007f1279835ab8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1279a26038 R14: 00007f1279a25fa0 R15: 00007fff0edfd1d8
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:idr_alloc_cyclic+0xa3/0x5f0 lib/idr.c:121
Code: 01 01 01 01 4b 89 44 2e 08 43 c7 44 2e 10 f3 f3 f3 f3 e8 30 5a 83 fc 49 8d 4c 24 14 48 89 4c 24 28 48 c1 e9 03 48 89 4c 24 58 <42> 0f b6 04 29 84 c0 0f 85 39 04 00 00 45 8b 6c 24 14 31 ff 89 de
RSP: 0018:ffffc9000e5f74c0 EFLAGS: 00010203
RAX: ffffffff84ee1410 RBX: 0000000000000000 RCX: 0000000000000004
RDX: ffffc900016da000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc9000e5f7610 R08: 0000000000000a20 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52001cbeeb4 R12: 0000000000000010
R13: dffffc0000000000 R14: 1ffff92001cbeea4 R15: 0000000000000001
FS: 00007f127a7046c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd9e3d58060 CR3: 0000000142193000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 01 01 add %eax,(%rcx)
2: 01 01 add %eax,(%rcx)
4: 4b 89 44 2e 08 mov %rax,0x8(%r14,%r13,1)
9: 43 c7 44 2e 10 f3 f3 movl $0xf3f3f3f3,0x10(%r14,%r13,1)
10: f3 f3
12: e8 30 5a 83 fc call 0xfc835a47
17: 49 8d 4c 24 14 lea 0x14(%r12),%rcx
1c: 48 89 4c 24 28 mov %rcx,0x28(%rsp)
21: 48 c1 e9 03 shr $0x3,%rcx
25: 48 89 4c 24 58 mov %rcx,0x58(%rsp)
* 2a: 42 0f b6 04 29 movzbl (%rcx,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 39 04 00 00 jne 0x470
37: 45 8b 6c 24 14 mov 0x14(%r12),%r13d
3c: 31 ff xor %edi,%edi
3e: 89 de mov %ebx,%esi