You are not logged in.

#1 2017-01-15 11:01:32

DarkDeepBlue
Member
Registered: 2017-01-15
Posts: 4

GDB with grsec

Hello people,

I try to use gdb for debugging while also using a grsec kernel.

Now, if I do it the usual way, I cannot set breakpoints and gdb shows the following message:

warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages!
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x4fbbcb

The best resource I found addressing this is Hardened/Debugging in the Gentoo forums.
Unfortunately, this approach doesn’t work for me even after I set all the possible flags on the binary I want to debug.

# paxctl -pemrxs binary

So, I would be glad if you could tell me how to debug properly on a grsec kernel in ArchLinux.
Thank you in advance.

Offline

#2 2017-01-16 08:58:38

DarkDeepBlue
Member
Registered: 2017-01-15
Posts: 4

Re: GDB with grsec

Alright, the solution was actually already in the wiki:

$ setfattr -n user.pax.flags -v "emr" binary

Offline

Board footer

Powered by FluxBB