by cmouse » Wed Dec 31, 2003 4:27 am
Ok. I tested it with following ACL's as well:
/usr/bin/gdb {
+CAP_SYS_PTRACE
/bin/bash rwxt
/usr/bin/gdb rwxti
/home rwxt
}
This creates no errors, but it will cause GDB to hang since it can't modify the running binary.
Next ACL:
/usr/bin/gdb {
+CAP_SYS_PTRACE
/bin/bash rwxt
/usr/bin/gdb rwxti
}
Starting program: /home/cmouse/projects/eics/eics
/bin/bash: line 1: /home/cmouse/projects/eics/eics: Permission denied
/bin/bash: line 1: /home/cmouse/projects/eics/eics: Success
Program exited with code 01.
You can't do that without a process to debug.
grsec: From 194.100.219.29: denied ptrace of /home/cmouse/projects/eics/eics by (bash:798) UID(1000) EUID(1000), parent (gdb:21687) UID(1000) EUID(1000)
So this ACL 'should' work, but it seems to deny any ptrace().
Btw, I'm using Linux 2.4.23 with grsecurity-1.9.13-2.4.23 patch.