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-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Apr 2024 14:45:08 +0300
From: Roman Smirnov <r.smirnov@....ru>
To: Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil
	<hverkuil-cisco@...all.nl>, Luis Chamberlain <mcgrof@...nel.org>, Jia-Ju Bai
	<baijiaju1990@...il.com>
CC: Roman Smirnov <r.smirnov@....ru>, <linux-media@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Sergey Shtylyov <s.shtylyov@....ru>,
	<lvc-project@...uxtesting.org>
Subject: [PATCH 2/3] media: tuners: xc5000: fix error code handling in xc5000_attach()

xc5000_attach() uses the hybrid_tuner_request_state() macro.
It may return the error code -ENOMEM, but the function handle
the value 0 instead.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: b9302fa7ed97 ("media: tuners: fix error return code of hybrid_tuner_request_state()")
Signed-off-by: Roman Smirnov <r.smirnov@....ru>
---
 drivers/media/tuners/xc5000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index 2182e5b7b606..6e47edee8ac3 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -1379,7 +1379,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
 					      hybrid_tuner_instance_list,
 					      i2c, cfg->i2c_address, "xc5000");
 	switch (instance) {
-	case 0:
+	case -ENOMEM:
 		goto fail;
 	case 1:
 		/* new tuner instance */
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ