subgraph / subgraph-os-issues

Subgraph OS issues repository
74 stars 9 forks source link

(gdb) "warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages!" #308

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi.

I've been getting the previously mentioned warning while using gdb. It does not cause it to crash, though and I'm worried if it might affect its results. Running it side by side with journalctl shows it is being blocked due to bruteforce prevention it also assumes the program should carsh as a result (Please investigate the crash report) though as I've stated before, it doesn't.

Here's a snippet of gdb's print:

user@subgraph:~$ gdb PCSX2
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
---Type <return> to continue, or q <return> to quit---
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from PCSX2...Reading symbols from /usr/lib/debug/.build-id/20/f4c82d3e30a98bdede21653e604950d8ef9692.debug...done.
done.
(gdb) run
Starting program: /usr/games/PCSX2 
warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages!
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
19:40:53: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1010,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1009,wx containers,compatible with 2.8).

And the output of sudo journalctl -f while peforming the command:

Oct 22 19:40:53 subgraph audit[22137]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=3 pid=22137 comm="gdb" exe="/usr/bin/gdb" sig=9
Oct 22 19:40:53 subgraph kernel: PAX: execution attempt in: <anonymous mapping>, 3b354ee3000-3b354ee4000 3b354ee3000
Oct 22 19:40:53 subgraph kernel: PAX: terminating task: /usr/bin/gdb(gdb):22137, uid/euid: 1000/1000, PC: 000003b354ee3000, SP: 000003fede1e39e0
Oct 22 19:40:53 subgraph kernel: PAX: bytes at PC: cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
Oct 22 19:40:53 subgraph kernel: 
Oct 22 19:40:53 subgraph kernel: PAX: bytes at SP-8: 000003b354ee3000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000046505845 000002b9d3526bcd 00000000ffffffff 0000000000000000 0000000000000000 000002b900005676
Oct 22 19:40:53 subgraph kernel: 
Oct 22 19:40:53 subgraph kernel: grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/bin/gdb[gdb:22137] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/gdb[gdb:22091] uid/euid:1000/1000 gid/egid:1000/1000
Oct 22 19:40:53 subgraph kernel: grsec: bruteforce prevention initiated for the next 30 minutes or until service restarted, stalling each fork 30 seconds.  Please investigate the crash report for /usr/bin/gdb[gdb:22137] uid/euid:1000/1000 gid/egid:1000/1000, parent /usr/bin/gdb[gdb:22091] uid/euid:1000/1000 gid/egid:1000/1000

Finally, could I use paxrat in order for gdb not to trigger the bruteforce prevention? Thanks.