Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145990365
D3908.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
544 B
Referenced Files
None
Subscribers
None
D3908.diff
View Options
Index: head/sys/kern/sys_process.c
===================================================================
--- head/sys/kern/sys_process.c
+++ head/sys/kern/sys_process.c
@@ -744,7 +744,18 @@
*/
switch (req) {
case PT_TRACE_ME:
- /* Always legal. */
+ /*
+ * Always legal, when there is a parent process which
+ * could trace us. Otherwise, reject.
+ */
+ if ((p->p_flag & P_TRACED) != 0) {
+ error = EBUSY;
+ goto fail;
+ }
+ if (p->p_pptr == initproc) {
+ error = EPERM;
+ goto fail;
+ }
break;
case PT_ATTACH:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 7:35 PM (12 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29040107
Default Alt Text
D3908.diff (544 B)
Attached To
Mode
D3908: Several fixes resulted from the ptrace(2) fuzzing by pho
Attached
Detach File
Event Timeline
Log In to Comment