diff options
author | sef <sef@FreeBSD.org> | 1997-08-12 04:34:30 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1997-08-12 04:34:30 +0000 |
commit | ea579a477de5aabed2fd91f73b46be6afbfb2f6d (patch) | |
tree | eac6c582162dcbb910c93ef9d2afc40c754971e4 /sys/miscfs/procfs/procfs_regs.c | |
parent | 4777af062a5f7f20d37d43b4c740b59b084caba0 (diff) | |
download | FreeBSD-src-ea579a477de5aabed2fd91f73b46be6afbfb2f6d.zip FreeBSD-src-ea579a477de5aabed2fd91f73b46be6afbfb2f6d.tar.gz |
Fix procfs security hole -- check permissions on meaningful I/Os (namely,
reading/writing of mem and regs). Also have to check for the requesting
process being group KMEM -- this is a bit of a hack, but ps et al need it.
Reviewed by: davidg
Diffstat (limited to 'sys/miscfs/procfs/procfs_regs.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_regs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_regs.c b/sys/miscfs/procfs/procfs_regs.c index 276c5ed..d215d44 100644 --- a/sys/miscfs/procfs/procfs_regs.c +++ b/sys/miscfs/procfs/procfs_regs.c @@ -37,7 +37,7 @@ * @(#)procfs_regs.c 8.4 (Berkeley) 6/15/94 * * From: - * $Id: procfs_regs.c,v 1.6 1997/02/22 09:40:29 peter Exp $ + * $Id: procfs_regs.c,v 1.7 1997/08/02 14:32:16 bde Exp $ */ #include <sys/param.h> @@ -60,6 +60,8 @@ procfs_doregs(curp, p, pfs, uio) char *kv; int kl; + if (!CHECKIO(curp, p)) + return EPERM; kl = sizeof(r); kv = (char *) &r; |