Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177618091
D61598.1794849792.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
721 B
Referenced Files
None
Subscribers
None
D61598.1794849792.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D61598: ptrace: Validate error numbers passed to PT_SET_SC_RET
Attached
Detach File
Event Timeline