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: <20150108223022.7F56FD13@viggo.jf.intel.com>
Date:	Thu, 08 Jan 2015 14:30:22 -0800
From:	Dave Hansen <dave@...1.net>
To:	linux-kernel@...r.kernel.org
Cc:	tglx@...utronix.de, x86@...nel.org, luto@...capital.net,
	Dave Hansen <dave@...1.net>, mtk.manpages@...il.com,
	dave.hansen@...ux.intel.com
Subject: [PATCH 3/3] x86 mpx: strictly enforce empty prctl() args


From: Dave Hansen <dave.hansen@...ux.intel.com>

Description from Michael Kerrisk.  He suggested an identical patch
to one I had already coded up and tested.

commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7 added two new prctl()
operations, PR_MPX_ENABLE_MANAGEMENT and PR_MPX_DISABLE_MANAGEMENT.
However, no checks were included to ensure that unused arguments
are zero, as is done in many existing prctl()s and as should be 
done for all new prctl()s. This patch adds the required checks.

Suggested-by: Andy Lutomirski <luto@...capital.net>
Suggested-by: Michael Kerrisk <mtk.manpages@...il.com>
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
---

 b/kernel/sys.c |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN kernel/sys.c~x86-mpx-strictly-enforce-empty-prctl-args kernel/sys.c
--- a/kernel/sys.c~x86-mpx-strictly-enforce-empty-prctl-args	2015-01-08 12:48:09.868898228 -0800
+++ b/kernel/sys.c	2015-01-08 12:48:09.872898408 -0800
@@ -2210,9 +2210,13 @@ SYSCALL_DEFINE5(prctl, int, option, unsi
 		up_write(&me->mm->mmap_sem);
 		break;
 	case PR_MPX_ENABLE_MANAGEMENT:
+		if (arg2 || arg3 || arg4 || arg5)
+			return -EINVAL;
 		error = MPX_ENABLE_MANAGEMENT(me);
 		break;
 	case PR_MPX_DISABLE_MANAGEMENT:
+		if (arg2 || arg3 || arg4 || arg5)
+			return -EINVAL;
 		error = MPX_DISABLE_MANAGEMENT(me);
 		break;
 	default:
_
--
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