Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149481 Details for
Bug 228816
CVE-2007-0771 utrace regression / denial of service
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
modified test program
ptrace-thrash.c (text/x-csrc), 1.24 KB, created by
Roland McGrath
on 2007-03-07 19:40:38 UTC
(
hide
)
Description:
modified test program
Filename:
MIME Type:
Creator:
Roland McGrath
Created:
2007-03-07 19:40:38 UTC
Size:
1.24 KB
patch
obsolete
>#include <stdlib.h> >#include <errno.h> >#include <stdio.h> >#include <unistd.h> >#include <pthread.h> >#include <sys/ptrace.h> >#include <signal.h> > >static void *thread_func(void *arg) >{ > execl("/proc/self/exe", NULL); > return NULL; >} > >int main(int argc, const char *argv[]) >{ > pthread_t thread; > int pid, n; > > int a = 1, d = 1; > > if (argc > 1) > switch (argv[1][0]) > { > case 'a': d = 0;break; > case 'd': a = 0;break; > } > > if (argv[0] && (pid = fork())) > for (n = 1; /*n < 1000000*/; ++n) { > > static unsigned long counts[2][200]; > inline void do_ptrace(int req, int idx) > { > int rc = ptrace(req, pid, NULL, 0) == 0 ? 0 : errno?:-1; > if (rc>=200 || rc<0) > abort(); > counts[idx][rc]++; > } > if (a || n == 1) > do_ptrace(PTRACE_ATTACH, 0); > if (d) > do_ptrace(PTRACE_DETACH, 1); > > if (!(n % 100000)) { > printf("passed: %d (%s)", n, > (a&&d)?"a/d":a?"a":"d"); > for (int i = 0; i < 200; ++i) > if (counts[0][i] || counts[1][i]) { > printf("; %d (%lu/%lu)", > i, counts[0][i], counts[1][i]); > counts[0][i] = counts[1][i] = 0; > } > puts(""); > } > } > > if (pthread_create(&thread, NULL, thread_func, NULL)) > perror("pthread_create"); > > while (1) > pause(); > return 1; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 228816
:
149446
| 149481 |
149546