Page MenuHomeFreeBSD

D61598.1794849792.diff
No OneTemporary

Authored By
Unknown
Size
721 B
Referenced Files
None
Subscribers
None

D61598.1794849792.diff

diff --git a/lib/libsys/ptrace.2 b/lib/libsys/ptrace.2
--- a/lib/libsys/ptrace.2
+++ b/lib/libsys/ptrace.2
@@ -877,6 +877,8 @@
the content of the
.Vt "struct ptrace_sc_ret"
argument.
+.Pp
+Only valid, non-negative error numbers can be specified.
.It Dv PT_FOLLOW_FORK
This request controls tracing for new child processes of a traced process.
If
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -1491,6 +1491,10 @@
break;
}
psr = addr;
+ if (psr->sr_error < 0 || psr->sr_error > ELAST) {
+ error = EINVAL;
+ break;
+ }
td2->td_errno = psr->sr_error;
if (td2->td_errno == 0) {
td2->td_retval[0] = psr->sr_retval[0];

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 16, 5:23 PM (16 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41785002
Default Alt Text
D61598.1794849792.diff (721 B)

Event Timeline