Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/miscfs/procfs Pull up revision 1.22 (requested by he):
details: https://anonhg.NetBSD.org/src/rev/ca0c4d607b5d
branches: netbsd-1-4
changeset: 471321:ca0c4d607b5d
user: he <he%NetBSD.org@localhost>
date: Mon Jan 14 15:20:07 2002 +0000
description:
Pull up revision 1.22 (requested by he):
Fix a ptrace/execve race condition which could be used to modify
the child process' image during execve. This would be a security
issue due to setuid programs.
diffstat:
sys/miscfs/procfs/procfs_ctl.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 247c222b1e30 -r ca0c4d607b5d sys/miscfs/procfs/procfs_ctl.c
--- a/sys/miscfs/procfs/procfs_ctl.c Mon Jan 14 15:19:44 2002 +0000
+++ b/sys/miscfs/procfs/procfs_ctl.c Mon Jan 14 15:20:07 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_ctl.c,v 1.16 1997/04/28 04:49:34 mycroft Exp $ */
+/* $NetBSD: procfs_ctl.c,v 1.16.16.1 2002/01/14 15:20:07 he Exp $ */
/*
* Copyright (c) 1993 Jan-Simon Pendry
@@ -106,10 +106,16 @@
int error;
/*
+ * You cannot do anything to the process if it is currently exec'ing
+ */
+ if (ISSET(p->p_flag, P_INEXEC))
+ return (EAGAIN);
+
+ switch (op) {
+ /*
* Attach - attaches the target process for debugging
* by the calling process.
*/
- switch (op) {
case PROCFS_CTL_ATTACH:
/*
* You can't attach to a process if:
Home |
Main Index |
Thread Index |
Old Index