Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Be paranoid about PT_SET_SIGINFO and PT_GET_SIGINFO...
details: https://anonhg.NetBSD.org/src/rev/be7e111e469c
branches: trunk
changeset: 351393:be7e111e469c
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Feb 11 19:32:41 2017 +0000
description:
Be paranoid about PT_SET_SIGINFO and PT_GET_SIGINFO in ptrace(2)
Currently a tracer is prohibited to read and write memory of a tracee.
Prohibit reading and faking signal information.
Sponsored by <The NetBSD Foundation>
diffstat:
sys/kern/sys_ptrace_common.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 201993f78d43 -r be7e111e469c sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c Sat Feb 11 19:30:02 2017 +0000
+++ b/sys/kern/sys_ptrace_common.c Sat Feb 11 19:32:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_ptrace_common.c,v 1.12 2017/01/26 03:54:01 christos Exp $ */
+/* $NetBSD: sys_ptrace_common.c,v 1.13 2017/02/11 19:32:41 kamil Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.12 2017/01/26 03:54:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.13 2017/02/11 19:32:41 kamil Exp $");
#ifdef _KERNEL_OPT
#include "opt_ptrace.h"
@@ -404,6 +404,8 @@
case PT_WRITE_I:
case PT_WRITE_D:
case PT_IO:
+ case PT_SET_SIGINFO:
+ case PT_GET_SIGINFO:
#ifdef PT_GETREGS
case PT_GETREGS:
#endif
@@ -451,8 +453,6 @@
case PT_SET_EVENT_MASK:
case PT_GET_EVENT_MASK:
case PT_GET_PROCESS_STATE:
- case PT_SET_SIGINFO:
- case PT_GET_SIGINFO:
/*
* You can't do what you want to the process if:
* (1) It's not being traced at all,
Home |
Main Index |
Thread Index |
Old Index