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:
 <SE1P216MB228778D3FDBBE2C3A45FB9A7FD2E2@SE1P216MB2287.KORP216.PROD.OUTLOOK.COM>
Date: Mon, 25 Nov 2024 11:21:35 +0000
From: (학생) 장인규 (컴퓨터공학과)
	<ingyujang25@...st.ac.kr>
To: "James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>, "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>
CC: "njavali@...vell.com" <njavali@...vell.com>,
	"GR-QLogic-Storage-Upstream@...vell.com"
	<GR-QLogic-Storage-Upstream@...vell.com>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: [PATCH RESEND] qla2xxx: Fix START_SP_W_RETRIES returns positive
 EINVAL

From 6e78ff23b9f11f6896c09299e0a38b4443420eed Mon Sep 17 00:00:00 2001
From: Ingyu Jang <ingyujang25@...st.ac.kr>
Date: Mon, 25 Nov 2024 20:20:00 +0900
Subject: [PATCH RESEND] qla2xxx: Fix START_SP_W_RETRIES returns positive EINVAL

The START_SP_W_RETRIES macro previously returned a positive EINVAL code
when chip generation or login generation mismatches were detected,
potentially leading to improper error handling in caller functions and
creating security risks if the error state was misinterpreted.

This patch updates the macro to return -EINVAL, aligning with kernel
error handling conventions and mitigating unintended behavior in
error handling.

Signed-off-by: Ingyu Jang <ingyujang25@...st.ac.kr>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 31fc6a0eca3e..089d560e4114 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2059,7 +2059,7 @@ static void qla_marker_sp_done(srb_t *sp, int res)
         int cnt = 5; \
         do { \
                 if (_chip_gen != sp->vha->hw->chip_reset || _login_gen != sp->fcport->login_gen) {\
-                       _rval = EINVAL; \
+                       _rval = -EINVAL; \
                         break; \
                 } \
                 _rval = qla2x00_start_sp(_sp); \
--
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ