lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191015200315.28830-1-vvidic@valentin-vidic.from.hr>
Date:   Tue, 15 Oct 2019 22:03:15 +0200
From:   Valentin Vidic <vvidic@...entin-vidic.from.hr>
To:     Michael Krufky <mkrufky@...uxtv.org>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Valentin Vidic <vvidic@...entin-vidic.from.hr>,
        syzbot+98730b985cad4931a552@...kaller.appspotmail.com
Subject: [PATCH] media: cxusb: fix uninitialized local variable

Make sure ircode does not contain random values if the call to
cxusb_ctrl_msg fails for some reason.

Reported-by: syzbot+98730b985cad4931a552@...kaller.appspotmail.com
Signed-off-by: Valentin Vidic <vvidic@...entin-vidic.from.hr>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ