Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2522278imm; Thu, 7 Jun 2018 12:04:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL6W33KFQHeYysRPWFFG9luGNpvNJzyX5ZNO6TJ48yG6rN8nTzfDSsYR1QkNeY4lQv1ey6/ X-Received: by 2002:a62:f206:: with SMTP id m6-v6mr2827008pfh.171.1528398276851; Thu, 07 Jun 2018 12:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398276; cv=none; d=google.com; s=arc-20160816; b=jd1sSISqVr9CmTb5ea0awfasaTpZy7RvZ3vJSacwSqo817LulBwtNhomyP/O+tKxdJ Z9KRF6XAbI/Wp0MTRVJJSwype2WQU1EcrULfdJGkyS9BnfvO6Rm1bw7fgNya9bcEcsnU XpGLCufKEe92hRv7TZvTw00MK2HWaTt+EPalMzNqG7gHDJLe2NOXcRi1HrbsjImduFch xxUsOhphxQJCPKs5P5RopRu7/uLGyFoX4vnR+IqcfpSP3lgbdsbGnBJwgCKUF4EHXwnq 4LgdBYyf4tR6gsGX8Rzq2a6D5HKCshVmFeXUsno9lAtT2LqO64IXmSTmiBkCZveyX9Wc djiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=19MSpOrVPn8ygs+LoCXL4MH5Q2UIirGbqx+iW/cs+X8=; b=DSjgI03s7NyOOJFgJUn3lVvy3k+TfBo8n8oCuXKV9MD4yTMgJXx7izE+YlUNsRLv91 GDjXJv4twGi0Uy4OH5WouMGNz8Qe+nZ+O/M67/EwPZBTEHrbkgivFlYvk2mB6NH6KGVk kn7mu9Fnd/fRtNXMKtaCCc3Sse2L/n5Sr0/x4PcMvTC7g6ZkCrjeBbzykaHqvHJh6d6V AKBsK17kkMTR86Pvy084JZhHkThqh52KBa+abvgFFMx2KTdM7ny5+6pYNHT98glEx0UC OQ4DJtzu53eLbHQhSDE1bBUNmJ2sxYke47QgAOU6hPgeIrtoj0bmSl/KJNZ60uW6tiIa HyRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v198-v6si26502840pgb.113.2018.06.07.12.04.22; Thu, 07 Jun 2018 12:04:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933500AbeFGRKG (ORCPT + 99 others); Thu, 7 Jun 2018 13:10:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43330 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932957AbeFGRKF (ORCPT ); Thu, 7 Jun 2018 13:10:05 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3322C406E8C4; Thu, 7 Jun 2018 17:10:04 +0000 (UTC) Received: from redhat.com (ovpn-120-226.rdu2.redhat.com [10.10.120.226]) by smtp.corp.redhat.com (Postfix) with SMTP id 1BBE81C668; Thu, 7 Jun 2018 17:10:01 +0000 (UTC) Date: Thu, 7 Jun 2018 20:10:01 +0300 From: "Michael S. Tsirkin" To: syzbot Cc: avagin@openvz.org, davem@davemloft.net, dingtianhong@huawei.com, edumazet@google.com, elena.reshetova@intel.com, jasowang@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, matthew@mjdsystems.ca, mingo@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk, virtualization@lists.linux-foundation.org, willemb@google.com Subject: Re: KMSAN: uninit-value in _copy_to_iter (2) Message-ID: <20180607183629-mutt-send-email-mst@kernel.org> References: <000000000000a5b2b1056a86e98c@google.com> <000000000000cf4578056ab12452@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000cf4578056ab12452@google.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 07 Jun 2018 17:10:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 07 Jun 2018 17:10:04 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org #syz test: https://github.com/google/kmsan.git master Subject: vhost: fix info leak Fixes: CVE-2018-1118 Signed-off-by: Michael S. Tsirkin --- diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f0be5f35ab28..9beefa6ed1ce 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2345,6 +2345,9 @@ struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type) struct vhost_msg_node *node = kmalloc(sizeof *node, GFP_KERNEL); if (!node) return NULL; + + /* Make sure all padding within the structure is initialized. */ + memset(&node->msg, 0, sizeof node->msg); node->vq = vq; node->msg.type = type; return node;