Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/procfs From Aleksey Cheusov: Don't make it easy f...
details: https://anonhg.NetBSD.org/src/rev/b6b9e7de1fd2
branches: trunk
changeset: 766485:b6b9e7de1fd2
user: christos <christos%NetBSD.org@localhost>
date: Thu Jun 23 17:06:38 2011 +0000
description:
>From Aleksey Cheusov: Don't make it easy for compromised systems to bypass
ASLR protections by providing the mapping addresses of programs to everyone.
diffstat:
sys/miscfs/procfs/procfs_vnops.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 8d37cdfa564a -r b6b9e7de1fd2 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c Thu Jun 23 16:56:07 2011 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c Thu Jun 23 17:06:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_vnops.c,v 1.180 2010/07/01 02:38:31 rmind Exp $ */
+/* $NetBSD: procfs_vnops.c,v 1.181 2011/06/23 17:06:38 christos Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.180 2010/07/01 02:38:31 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vnops.c,v 1.181 2011/06/23 17:06:38 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -723,6 +723,8 @@
case PFScmdline:
case PFSemul:
case PFSstatm:
+ if (pfs->pfs_type == PFSmap || pfs->pfs_type == PFSmaps)
+ vap->va_mode = S_IRUSR;
vap->va_nlink = 1;
vap->va_uid = kauth_cred_geteuid(procp->p_cred);
vap->va_gid = kauth_cred_getegid(procp->p_cred);
Home |
Main Index |
Thread Index |
Old Index