Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2782255imm; Thu, 18 Oct 2018 22:47:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV60t5Ht44SJcnIle1+pKA7J36qz865/BSdfzPRWAGQ5Ut0bQSeBldVri+jb1V4Oz3AXj14yt X-Received: by 2002:a63:5059:: with SMTP id q25-v6mr30924827pgl.171.1539928031755; Thu, 18 Oct 2018 22:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539928031; cv=none; d=google.com; s=arc-20160816; b=RXDeVIqa2Cpv9tCHZnbb9tPWePVUNDPUeD/M4HYQpy8jwGqvu670U1Jll3WF74ubX5 wNqo4KfNNb0NAsT0/surQMC84yTffpdOS7U+nkFiCJdb7Yje0U9qkiIdv0tuIC8WqwOu jxi3nw0VNQwtltZn3O5JCE4xePt/ifMBxzaQwruuWh4/3IpN6JbCCYaqBytKkXH4R93i 6I0R4AS59cREUG6ol/ODw4IXkzB6GzYAnF/DCGWaeIIQV+44oKGSkB0fVmigQmbYRIlL Zf+ykKTU8qRbdVgyVsqjh5GKj3hDHRfy/eevHdUWqGuiSGG0f3yTz5TKUjrfkjBuvzXw su+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=3TsSiTjFrIc2A5dU/o+dQzsLgSj9A4woQmlNj1u87Hg=; b=dtdDRFhW29Jr7xAew65Jsj9bRQhNm06Zhi4qqqFL41bpokZwdMe6ISVq420wB8Hgju InRfeME4kYNDN1uzIoO9RwHzh8dOstyB6lhoUuqpSbPqMzwdTDLiDw6BZ6Dl1vYVMwoN oWGII5nkxJJBqvbdC2HTm+E2sWI4KtrI91kUEpZbLD8ry3jASJDQdOJnNKwwVZBw/GNX G2zm8IaXQH2kzZ7HbsIB02s+DYBxUV75XL5thqwjMUgYEeIk6s1A7A4TwltNLY6NiDj+ edNaatbcHOBDBHUHjvaTvKMJ7fBRZ+oYr4+SWQwHGzo2NV4U0hRZXHE+0kSCmUo8JVIx eL7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@who-t.net header.s=fm1 header.b=FsLdYsac; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="ksQg71/A"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1-v6si23571249pga.240.2018.10.18.22.46.54; Thu, 18 Oct 2018 22:47:11 -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; dkim=pass header.i=@who-t.net header.s=fm1 header.b=FsLdYsac; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="ksQg71/A"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbeJSNvE (ORCPT + 99 others); Fri, 19 Oct 2018 09:51:04 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58483 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbeJSNvE (ORCPT ); Fri, 19 Oct 2018 09:51:04 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 703C721F11; Fri, 19 Oct 2018 01:46:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 19 Oct 2018 01:46:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=who-t.net; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=3TsSiTjFrIc2A5dU/o+dQzsLgSj 9A4woQmlNj1u87Hg=; b=FsLdYsacAvGwN/j/JwHOoAi2HbnSlUzbMuem1KwwPgj 2z8y37gne+3yfJ82KXU3tV/gGs3ujqApL9eG9Wl+iPLC0Mp43sf/fAMWIfOCWw84 lC36pIMC1QXpdN31oNxzSvGkLHZQe26Vj3047b7ubZeQ66PY+DvQsZedYH7CA32K +Cd+FBQbl8Szz7HYep1nwWpAs5P1e28qBH/06RXQ4dxHacpCZboBOXHrk93UQdlB ZORu8NuM518ZMkWvB0O4z/sQKGcXMUgM+IKswwORHSVwrQ1dwrqSDGhN3CXKiiHX iN/G1YdjXa/+aRwPsFKbY4Mg6yPIcI0bSSlIqc7qFBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3TsSiT jFrIc2A5dU/o+dQzsLgSj9A4woQmlNj1u87Hg=; b=ksQg71/A+CLjbmIqjbfwCp FKftzBENBDGd6ErOxIxzFZPcml96NCDd5ug4nUSqWeYaUGZfNpN4B/V3I5DGkkiu /rMv1ofn14GMX0wy4uKjbnjDen0zilEAOp4lqFU3hKrCcfJbv4+tmqPaGCvYjTro LdxgpEolsh1mrp4B9gMn1Q0vG+fmfltT3c7z9EVPdCIz91FQptuEWHeGgaGfiQ79 wTwh4NOlT3lwZcSPQ4ygUTdQUMZR82xGyh8poOcgua/Iz3d1Uz6R5lL328suAK0g KTmiob/n6FEo/+Z4TXBNh30ra0lAFcBBXr7ESZMyaRwBqomhZm10+cUuzUqPZKUA == X-ME-Sender: X-ME-Proxy: Received: from jelly (167-179-166-29.a7b3a6.bne.nbn.aussiebb.net [167.179.166.29]) by mail.messagingengine.com (Postfix) with ESMTPA id 18126E4408; Fri, 19 Oct 2018 01:46:29 -0400 (EDT) Date: Fri, 19 Oct 2018 15:46:24 +1000 From: Peter Hutterer To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Benjamin Tissoires , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: synaptics - avoid using uninitialized variable when probing Message-ID: <20181019054624.GA2783@jelly> References: <20181017001443.GA232819@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181017001443.GA232819@dtor-ws> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 16, 2018 at 05:14:43PM -0700, Dmitry Torokhov wrote: > synaptics_detect() does not check whether sending commands to the > device succeeds and instead relies on getting unique data from the > device. Let's make sure we seed entire buffer with zeroes to make sure > we not use garbage on stack that just happen to be 0x47. > > Reported-by: syzbot+13cb3b01d0784e4ffc3f@syzkaller.appspotmail.com > Signed-off-by: Dmitry Torokhov doh, was just about to send out the same patch. Reviewed-by: Peter Hutterer Cheers, Peter > --- > drivers/input/mouse/synaptics.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c > index 55d33500d55e..5e85f3cca867 100644 > --- a/drivers/input/mouse/synaptics.c > +++ b/drivers/input/mouse/synaptics.c > @@ -99,9 +99,7 @@ static int synaptics_mode_cmd(struct psmouse *psmouse, u8 mode) > int synaptics_detect(struct psmouse *psmouse, bool set_properties) > { > struct ps2dev *ps2dev = &psmouse->ps2dev; > - u8 param[4]; > - > - param[0] = 0; > + u8 param[4] = { 0 }; > > ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); > ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES); > -- > 2.19.1.331.ge82ca0e54c-goog > > > -- > Dmitry