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>] [day] [month] [year] [list]
Message-Id: <20250405073159.87021-1-superman.xpt@gmail.com>
Date: Sat,  5 Apr 2025 00:31:59 -0700
From: Penglei Jiang <superman.xpt@...il.com>
To: mkrufky@...uxtv.org,
	mchehab@...nel.org
Cc: linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Penglei Jiang <superman.xpt@...il.com>
Subject: [PATCH v2] media: cxusb: fix uninitialized var in cxusb_gpio_tuner()

The function cxusb_ctrl_msg() may not set the value of the variable i,
but the code uses it later. Initialize the local variable i to 0 to
prevent potential issues.

Reported-by: syzbot+526bd95c0ec629993bf3@...kaller.appspotmail.com
Closes: https://lore.kernel.org/all/67f092b5.050a0220.0a13.0229.GAE@google.com
Signed-off-by: Penglei Jiang <superman.xpt@...il.com>
---
V1 -> V2: Updated the Subject

 drivers/media/usb/dvb-usb/cxusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c
index f44529b40989..7fe858bb665e 100644
--- a/drivers/media/usb/dvb-usb/cxusb.c
+++ b/drivers/media/usb/dvb-usb/cxusb.c
@@ -111,7 +111,7 @@ int cxusb_ctrl_msg(struct dvb_usb_device *d,
 static void cxusb_gpio_tuner(struct dvb_usb_device *d, int onoff)
 {
 	struct cxusb_state *st = d->priv;
-	u8 o[2], i;
+	u8 o[2], i = 0;
 
 	if (st->gpio_write_state[GPIO_TUNER] == onoff &&
 	    !st->gpio_write_refresh[GPIO_TUNER])
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ