Crostini: vhost/vsock crashes on v4.14 host kernels |
|||
Issue descriptionv4.14 host kernels running Crostini (which uses vsock) crash occasionally with a general protection fault inside hash_del_rcu() called by vhost_vsock_dev_ioctl(). I believe this is the root cause of an issue uncovered by applying "vhost/vsock: fix use-after-free in network stack callers" in these branches. I sometimes see a crash in hash_del_rcu() with vsock in the call stack, and that call is protected by a newly-added check of vsock->guest_cid, which was uninitialized before this commit. Mainline already has a fix for this: commit a72b69dc083a931422cc8a5e33841aff7d5312f2 ("vhost/vsock: fix uninitialized vhost_vsock->guest_cid"). I've already sent a request to get this pulled into the relevant stable branches, and I'll also cherry pick this for our kernel branches in the meantime.
,
Jan 8
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/38b8f55c70895bc6b9aa622088c97e287a589687 commit 38b8f55c70895bc6b9aa622088c97e287a589687 Author: Stefan Hajnoczi <stefanha@redhat.com> Date: Tue Jan 08 07:46:15 2019 UPSTREAM: vhost/vsock: fix uninitialized vhost_vsock->guest_cid The vhost_vsock->guest_cid field is uninitialized when /dev/vhost-vsock is opened until the VHOST_VSOCK_SET_GUEST_CID ioctl is called. kvmalloc(..., GFP_KERNEL | __GFP_RETRY_MAYFAIL) does not zero memory. All other vhost_vsock fields are initialized explicitly so just initialize this field too. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit a72b69dc083a931422cc8a5e33841aff7d5312f2) BUG= chromium:919675 TEST=Run Crostini on grunt; verify that it does not crash Change-Id: I49029226ce53a0f51a3a76717c8feb1471396f99 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1399245 Tested-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> [modify] https://crrev.com/38b8f55c70895bc6b9aa622088c97e287a589687/drivers/vhost/vsock.c
,
Jan 8
Verified on grunt with Chrome OS R73-11546.0. |
|||
►
Sign in to add a comment |
|||
Comment 1 by dverkamp@chromium.org
, Jan 7