GDB and grsecurity

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

GDB and grsecurity

Postby cmouse » Fri Dec 20, 2002 4:37 am

Hmm.. I would love to use GDB in the grsecurity kernel to debug my own programs. It seems though that this is made impossible. Could you be so kind and tell me if it's even possible to use GDB?

(gdb) run
Starting program: /www/htdocs/cgi-bin/com.cgi
Warning:
Cannot insert breakpoint -2.
Error accessing memory address 0x276e7190: Input/output error.
The same program may be running in another process.
(gdb)
cmouse
 
Posts: 98
Joined: Tue Dec 17, 2002 10:58 am

Re: GDB and grsecurity

Postby PaX Team » Fri Dec 20, 2002 5:32 am

cmouse wrote:Hmm.. I would love to use GDB in the grsecurity kernel to debug my own programs. It seems though that this is made impossible. Could you be so kind and tell me if it's even possible to use GDB?
the error message you see is due to PaX, in particular the MPROTECT restrictions: executable regions are forced to be non-writable, even through the ptrace() interface (that could normally get around it), hence the gdb failure. the solution is to turn it off of course (on the target, not gdb), via chpax (or if you're using the later grsec patches, the ACL system).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Postby cmouse » Fri Dec 20, 2002 7:59 am

thanks... gotta try that =)
cmouse
 
Posts: 98
Joined: Tue Dec 17, 2002 10:58 am


Return to grsecurity support