Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6721131ybp; Tue, 15 Oct 2019 20:36:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5+3q9MsibF6q0cNhCTDYrXz7jD3zMVqVNhHJhaOCYcFtEeBUpvGjNvHDux98X8i+c3Qtw X-Received: by 2002:aa7:d145:: with SMTP id r5mr36329347edo.275.1571196969445; Tue, 15 Oct 2019 20:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571196969; cv=none; d=google.com; s=arc-20160816; b=EqR64dVWL5JmcRLpTgxcYavX9b5ZrrzvtuIviPUIX4ytgKiha0EbkC28w860x9+W9r okh1E8XQ4J658EQoFmSzLpyBGPZOOXKtnzgdBBCOo+Czht0gKAJWQTnuiX0JP1hjt6A9 sTKLQTn2ElCOxUNamZhVXMkKqaqYQ4eM79IQ+dV+gHR/etS/YotxUg2xfhmBWmR5CkBd 7DGayz0zGff55tY4yPhTR4ZIB7SOlFERartmR6iLRC24sQ/i0XuQdtE/hxdpVTWECjF3 i9lwBmCZBYLfga7CqkkyFQroPxpNLe0YDu78Q63JjIxvLa9N1YBpc43AAs6pAeMbJdni utsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IQ5d14Qr+R3aCFYeNyYq0iYNIyH0pz16ZTCXNEFcfek=; b=LhIW8zwlFg9peAd9C6gHGMdiGjzNZM4i5xZz57GKwLWraYVLsm8WprOyPD/EGzDuxY B/qa79cYoPeIDRhniJKiQ3h9MMSRtB8AFDJrZgyEb7/bOwikIhOqultQbESy36xLAoFS S42xJf7gQpFxmlGGKYetUvx5MkUXLmsk7b1JjK59cUcdIArDpiUcgVPyi8Kg61M66G/n imhmNF/qyp2iPZhMJwKmU5A44T6SwZ0xxBzsKX186JlFD24pUiXlWV0DMJwlu1ePknu+ xoVkGPpxKjb38dsHa20N2x8gGDVghq+chZJLsykVbgZuNImM1NzocDl4b8TI+lpiBix+ wzSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@valentin-vidic.from.hr header.s=2017 header.b=c12IzmZm; 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 sa18si14257867ejb.16.2019.10.15.20.35.27; Tue, 15 Oct 2019 20:36:09 -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=fail header.i=@valentin-vidic.from.hr header.s=2017 header.b=c12IzmZm; 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 S1732734AbfJOUD1 (ORCPT + 99 others); Tue, 15 Oct 2019 16:03:27 -0400 Received: from valentin-vidic.from.hr ([94.229.67.141]:55081 "EHLO valentin-vidic.from.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbfJOUD1 (ORCPT ); Tue, 15 Oct 2019 16:03:27 -0400 X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id E1BD43BE3; Tue, 15 Oct 2019 22:03:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=valentin-vidic.from.hr; s=2017; t=1571169799; bh=GNW9Czf7yHedMIXjsdbi4/E3nPQNjtWoitMkwGeBl9o=; h=From:To:Cc:Subject:Date:From; b=c12IzmZmgL7MloSQbPKwaAOioP7OdqFUXrG5GDqBdtCwrldWW16CM/pwvc5c6c+gg PLr1D50uYht8OOtNyvEqwgQmUxP+4b/+/BgXknXLwhDuTiEABD56QegzysCZLaQr5A b8GfT5MmW1/7Jl84JQr2sHtcQPIO9RFuR+OZNv0oo7PJ7WV6wpBBZtdlOgaPfJvcW1 YM6zf9nJAsNahA2mq1A99Y7XiDq0W53/xYG3q3l/Ci3n9DKBO7B/kRa4IHT+R6hW5y G98M8fb6qVw1pb+CfEbCBPZNLQsO5dYB8uHL4K1qsf5W4R5p2t6HUr2YUlNanmPJyb Bp6ekw0Xnc7aw== From: Valentin Vidic To: Michael Krufky Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Valentin Vidic , syzbot+98730b985cad4931a552@syzkaller.appspotmail.com Subject: [PATCH] media: cxusb: fix uninitialized local variable Date: Tue, 15 Oct 2019 22:03:15 +0200 Message-Id: <20191015200315.28830-1-vvidic@valentin-vidic.from.hr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make sure ircode does not contain random values if the call to cxusb_ctrl_msg fails for some reason. Reported-by: syzbot+98730b985cad4931a552@syzkaller.appspotmail.com Signed-off-by: Valentin Vidic --- drivers/media/usb/dvb-usb/cxusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c index f02fa0a67aa4..afcd88dd96c0 100644 --- a/drivers/media/usb/dvb-usb/cxusb.c +++ b/drivers/media/usb/dvb-usb/cxusb.c @@ -519,7 +519,7 @@ static int cxusb_d680_dmb_streaming_ctrl(struct dvb_usb_adapter *adap, static int cxusb_rc_query(struct dvb_usb_device *d) { - u8 ircode[4]; + u8 ircode[4] = { 0 }; cxusb_ctrl_msg(d, CMD_GET_IR_CODE, NULL, 0, ircode, 4); @@ -531,7 +531,7 @@ static int cxusb_rc_query(struct dvb_usb_device *d) static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d) { - u8 ircode[4]; + u8 ircode[4] = { 0 }; struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, @@ -550,7 +550,7 @@ static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d) static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d) { - u8 ircode[2]; + u8 ircode[2] = { 0 }; if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) return 0; @@ -989,7 +989,7 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) { - u8 ircode[4]; + u8 ircode[4] = { 0 }; int i; struct i2c_msg msg = { .addr = 0x6b, -- 2.20.1