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: <20070223231112.GM7920@ca-server1.us.oracle.com>
Date:	Fri, 23 Feb 2007 15:11:12 -0800
From:	Joel Becker <Joel.Becker@...cle.com>
To:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH] mm/mincore: Return EFAULT when passed an invalid address.

 	The locking fix to sys_mincore in commit
2f77d107050abc14bc393b34bdb7b91cf670c250 returns -ENOMEM when given a
bad userspace address.  It should return -EFAULT.

Signed-off-by: Joel Becker <joel.becker@...cle.com>

diff --git a/mm/mincore.c b/mm/mincore.c
index 8aca6f7..4af963c 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -122,7 +122,7 @@ asmlinkage long sys_mincore(unsigned long start, size_t len,
 
 	/* ..and we need to be passed a valid user-space range */
 	if (!access_ok(VERIFY_READ, (void __user *) start, len))
-		return -ENOMEM;
+		return -EFAULT;
 
 	/* This also avoids any overflows on PAGE_CACHE_ALIGN */
 	pages = len >> PAGE_SHIFT;


-- 

"But then she looks me in the eye
 And says, 'We're going to last forever,'
 And man you know I can't begin to doubt it.
 Cause it just feels so good and so free and so right,
 I know we ain't never going to change our minds about it, Hey!
 Here comes my girl."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@...cle.com
Phone: (650) 506-8127
-
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