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: <20181224152903.15828-1-pakki001@umn.edu>
Date:   Mon, 24 Dec 2018 09:29:01 -0600
From:   Aditya Pakki <pakki001@....edu>
To:     pakki001@....edu
Cc:     kjlu@....edu, Mauro Carvalho Chehab <mchehab@...nel.org>,
        Brad Love <brad@...tdimension.cc>,
        Michael Ira Krufky <mkrufky@...uxtv.org>,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] media/lgdt3306a: Add a missing return value check.

In lgdt3306a.c, lgdt3306a_read_signal_strength() can fail while reading
the registers via lgdt3306a_read_reg(). The function can return an error
from i2c_transfer(). The fix checks the return value for this failure.

Signed-off-by: Aditya Pakki <pakki001@....edu>
---
 drivers/media/dvb-frontends/lgdt3306a.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
index 0e1f5daaf20c..b79f652d05e1 100644
--- a/drivers/media/dvb-frontends/lgdt3306a.c
+++ b/drivers/media/dvb-frontends/lgdt3306a.c
@@ -1685,7 +1685,10 @@ static int lgdt3306a_read_signal_strength(struct dvb_frontend *fe,
 	case QAM_256:
 	case QAM_AUTO:
 		/* need to know actual modulation to set proper SNR baseline */
-		lgdt3306a_read_reg(state, 0x00a6, &val);
+		ret = lgdt3306a_read_reg(state, 0x00a6, &val);
+		if (lg_chkerr(ret))
+			goto fail;
+
 		if(val & 0x04)
 			ref_snr = 2800; /* QAM-256 28dB */
 		else
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ