To: Pax Team
Thanks, I've tried that too without success, but assumed that is because I can't use "+PAX_EMUTRAMP" in policy, because my kernel was compiled without CONFIG_PAX_EMUTRAMP option. Or can I still use "+PAX_EMUTRAMP" in policy file? I've also tried "paxctl -CzEx /usr/sbin/grub-probe" instead of "paxctl -Cpsm /usr/sbin/grub-probe" but it didn't work (probably for the same reason that CONFIG_PAX_EMUTRAMP was not enabled in kernel).
To: Spender
As sure as I can be, I did "gradm -a admin" and authenticated, and dmesg(8) and other restricted commands worked (which don't work before authentication as admin role).
This is part of /etc/grsec/policy which should be relevant - the file did not change, only the kernel did (that is, the same policy seems too have worked under grsec-2.9-2.6.32.59-201205131656, but not grsec-2.9.1-2.6.32.60-201212271948)
- Code: Select all
role admin sA
role_allow_ip 0.0.0.0/32
role_allow_ip 192.168.200.0/24
role_alllow_ip x.x.x.x/x
subject / rvka
/ rwcdmlxi
RES_AS 24000M 24000M
subject /usr/sbin/grub-setup
-PAX_SEGMEXEC
-PAX_PAGEEXEC
subject /usr/sbin/grub-probe
-PAX_SEGMEXEC
-PAX_PAGEEXEC
subject /usr/sbin/grub-mkdevicemap
-PAX_SEGMEXEC
-PAX_PAGEEXEC
subject /bin/cat
-PAX_SEGMEXEC
-PAX_PAGEEXEC
after that goes "role default G" and it's rules.
Here I've reinstalled plain Debian Squeeze binaries, reloaded policy, entered admin role, and problem is still here
- Code: Select all
# apt-get install --reinstall grub-pc grub-common
[...]
# gradm -R
Password:
# gradm -a admin
Password:
# paxctl -v /usr/sbin/grub-probe
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team <pageexec@freemail.hu>
file /usr/sbin/grub-probe does not have a PT_PAX_FLAGS program header, try conversion
# update-grub
Killed (core dumped)
# dmesg -c
grsec: From x.x.x.x: (admin:S:/) successful change to special role admin (id 10) by /sbin/gradm[gradm:21387] uid/euid:0/0 gid/egid:0/0, parent /bin/zsh4[zsh:11752] uid/euid:0/0 gid/egid:0/0
PAX: From x.x.x.x: execution attempt in: <anonymous mapping>, 3d1b23a1000-3d1b23b7000 3fffffe9000
PAX: terminating task: /usr/sbin/grub-probe(grub-probe):21912, uid/euid: 0/0, PC: 000003d1b23b5a80, SP: 000003d1b23b5a28
PAX: bytes at PC: 41 bb b0 61 40 00 49 ba 70 5a 3b b2 d1 03 00 00 49 ff e3 00
PAX: bytes at SP-8: 0000000000000000 0000000000402bbb 0000000000000000 0000000000631960 000003d1b23b5a80 0000000000406346 0000000000000000 000003d1b23b5ea1 0000000000000003 000000000040601e 0000000000000000
# cat /proc/self/status
Name: cat
State: R (running)
Tgid: 29850
Pid: 29850
PPid: 11752
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 64
Groups: 0 510
VmPeak: 21496 kB
VmSize: 21496 kB
VmLck: 0 kB
VmHWM: 508 kB
VmRSS: 508 kB
VmData: 17788 kB
VmStk: 84 kB
VmExe: 48 kB
VmLib: 1500 kB
VmPTE: 32 kB
Threads: 1
SigQ: 1/16382
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 0000000000000000
CapInh: 0000000000000000
CapPrm: fffffffffffffeff
CapEff: fffffffffffffeff
CapBnd: fffffffffffffeff
voluntary_ctxt_switches: 0
nonvoluntary_ctxt_switches: 1
PaX: PeMRs
RBAC: admin:S:/
Thanks for tracing this down!