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]
Message-Id: <dde74ef5a830f172e05b660eef52ca5f26aa45ce.1409735865.git.jslaby@suse.cz>
Date:	Wed,  3 Sep 2014 11:27:15 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	stable@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>,
	Christoph Hellwig <hch@....de>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 56/56] hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl

From: "Stephen M. Cameron" <scameron@...rdog.cce.hp.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream.

When copy_from_user fails, return -EFAULT, not -ENOMEM

Signed-off-by: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
Reported-by: Robert Elliott <elliott@...com>
Reviewed-by: Joe Handzik <joseph.t.handzik@...com>
Reviewed-by: Scott Teel <scott.teel@...com>
Reviewed by: Mike MIller <michael.miller@...onical.com>
Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
 drivers/scsi/hpsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 0eb09403680c..d535e7504ea0 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3140,7 +3140,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
 		}
 		if (ioc->Request.Type.Direction == XFER_WRITE) {
 			if (copy_from_user(buff[sg_used], data_ptr, sz)) {
-				status = -ENOMEM;
+				status = -EFAULT;
 				goto cleanup1;
 			}
 		} else
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ