Eric Dumazet
64295f0d01
virtio/vsock: avoid NULL deref in virtio_transport_seqpacket_allow()
Make sure the_virtio_vsock is not NULL before dereferencing it.
general protection fault, probably for non-canonical address 0xdffffc0000000071: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000388-0x000000000000038f]
CPU: 0 PID: 8452 Comm: syz-executor406 Not tainted 5.13.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:virtio_transport_seqpacket_allow+0xbf/0x210 net/vmw_vsock/virtio_transport.c:503
Code: e8 c6 d9 ab f8 84 db 0f 84 0f 01 00 00 e8 09 d3 ab f8 48 8d bd 88 03 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e 2a 01 00 00 44 0f b6 a5 88 03 00 00
RSP: 0018:ffffc90003757c18 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000071 RSI: ffffffff88c908e7 RDI: 0000000000000388
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff88c90a06 R11: 0000000000000000 R12: 0000000000000000
R13: ffffffff88c90840 R14: 0000000000000000 R15: 0000000000000001
FS: 0000000001bee300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000082 CR3: 000000002847e000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
vsock_assign_transport+0x575/0x700 net/vmw_vsock/af_vsock.c:490
vsock_connect+0x200/0xc00 net/vmw_vsock/af_vsock.c:1337
__sys_connect_file+0x155/0x1a0 net/socket.c:1824
__sys_connect+0x161/0x190 net/socket.c:1841
__do_sys_connect net/socket.c:1851 [inline]
__se_sys_connect net/socket.c:1848 [inline]
__x64_sys_connect+0x6f/0xb0 net/socket.c:1848
do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43ee69
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd49e7c788 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee69
RDX: 0000000000000010 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 0000000000402e50 R08: 0000000000000000 R09: 0000000000400488
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ee0
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Fixes: 53efbba12cc7 ("virtio/vsock: enable SEQPACKET for transport")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Arseny Krasnov <arseny.krasnov@kaspersky.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-22 09:49:37 -07:00
..
2021-03-24 17:52:11 -07:00
2021-06-02 14:01:55 -07:00
2021-06-18 11:58:03 -07:00
2021-06-18 19:47:02 -07:00
2021-06-10 14:08:09 -07:00
2021-03-30 16:54:50 -07:00
2021-06-18 19:47:02 -07:00
2021-06-18 19:47:02 -07:00
2021-05-19 00:33:40 +02:00
2021-01-27 17:04:12 -08:00
2021-06-18 19:47:02 -07:00
2021-06-18 12:07:09 -07:00
2021-06-18 19:47:02 -07:00
2021-06-03 13:24:23 -07:00
2021-06-18 19:47:02 -07:00
2021-06-01 17:01:33 -07:00
2021-06-10 14:08:49 -07:00
2021-06-02 14:01:55 -07:00
2021-01-27 17:04:12 -08:00
2021-06-21 12:50:20 -07:00
2021-04-13 14:35:02 -07:00
2021-06-18 19:47:02 -07:00
2021-06-16 12:13:01 -07:00
2021-06-03 10:59:49 +02:00
2021-01-27 17:04:12 -08:00
2021-06-18 19:47:02 -07:00
2021-06-18 19:47:02 -07:00
2021-06-12 13:06:33 -07:00
2021-06-07 13:34:37 -07:00
2021-01-04 10:05:50 +01:00
2021-06-07 14:08:30 -07:00
2021-03-28 17:56:55 -07:00
2021-06-08 16:31:25 -07:00
2021-04-27 14:16:14 -07:00
2021-06-18 13:25:49 +02:00
2021-04-06 22:42:16 +02:00
2021-04-27 14:17:00 -07:00
2021-06-18 19:47:02 -07:00
2021-06-07 14:08:30 -07:00
2021-06-18 19:47:02 -07:00
2021-06-15 11:19:04 -07:00
2021-05-17 15:31:03 -07:00
2021-04-28 13:59:08 -07:00
2021-06-07 13:01:52 -07:00
2021-05-27 09:55:10 -07:00
2021-06-18 19:47:02 -07:00
2020-08-23 17:36:59 -05:00
2021-03-14 15:00:43 -07:00
2021-06-18 19:47:02 -07:00
2021-06-18 19:47:02 -07:00
2021-04-20 16:44:04 -07:00
2021-03-10 12:45:15 -08:00
2021-06-02 14:01:55 -07:00
2021-06-21 14:46:36 -07:00
2021-05-31 22:45:15 -07:00
2021-06-21 12:16:58 -07:00
2021-05-27 08:46:19 -04:00
2021-02-14 17:38:11 -08:00
2021-06-10 13:48:43 -07:00
2021-06-07 14:11:47 -07:00
2021-06-21 12:28:49 -07:00
2021-06-22 09:49:37 -07:00
2021-06-18 13:25:24 +02:00
2021-06-10 14:08:09 -07:00
2021-05-26 09:46:16 +02:00
2021-04-19 12:49:29 +02:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00
2021-05-11 13:56:16 -07:00
2021-01-27 17:03:52 -08:00
2021-06-21 14:41:54 -07:00
2021-04-12 13:27:11 -07:00