Page 1 of 1
denied executable mmap of /usr/sbin/hddtemp
Posted:
Sun Nov 27, 2005 7:34 am
by pesadilla
denied executable mmap of /usr/sbin/hddtemp by /usr/sbin/hddtemp[hddtemp:21967] uid/euid:1000/1000 gid/egid:1000/1000, parent /bin/zsh4[zsh4:5279] uid/euid:1000/1000 gid/egid:1000/1000
i got this error when i execute hddtemp /dev/hda and it returns zsh: killed hddtemp /dev/hda
my policy configuration:
- Code: Select all
subject /usr/sbin/hddtemp o {
/ h
/dev h
/dev/hda r
/etc h
/etc/hddtemp.db r
/etc/ld.so.cache r
/lib h
/lib/ld-2.3.5.so x
/lib/tls/libc-2.3.5.so rx
/usr h
/usr/lib/gconv/ISO8859-1.so rx
/usr/lib/gconv/gconv-modules r
/usr/lib/locale/locale-archive r
/usr/sbin/hddtemp x
-CAP_ALL
+CAP_SYS_RAWIO
bind disabled
connect disabled
}
Posted:
Sun Nov 27, 2005 9:39 am
by spender
Can you try removing your object for /usr/sbin/hddtemp and see if that makes a difference? gradm will automatically add an rx object for the subject. Also, do you have any inheritance rules for zsh or anything? What version of grsecurity is this? I don't see the rolename/roletype/subjectname in the log that is present in newer versions
-Brad
Posted:
Sun Nov 27, 2005 10:22 am
by pesadilla
Sorry i was brief and cut some information important. I'm using kernel 2.6.14
Exact error is:
- Code: Select all
Nov 27 12:28:33 Atlantis kernel: grsec: (owen:U:/) denied executable mmap of /usr/sbin/hddtemp by /usr/sbin/hddtemp[hddtemp:21967] uid/euid:1000/1000 gid/egid:1000/1000, parent /bin/zsh4[zsh4:5279] uid/euid:1000/1000 gid/egid:1000/1000
if i remove object for /usr/bin/hddtemp i get the same error,
- Code: Select all
subject /bin/zsh4 o {
..
/usr/sbin
}
thanks for all
Posted:
Sun Nov 27, 2005 10:25 am
by spender
Paste the policy for subject / of user role own, since that is the one causing the problem from the log.
-Brad
Posted:
Sun Nov 27, 2005 11:52 am
by pesadilla
this role was obtened by learning-full
- Code: Select all
role owen u
role_allow_ip 0.0.0.0/0
subject / {
/
/bin x
/sbin x
/etc rx
/etc/grsec h
/etc/shadow- h
/etc/gshadow h
/etc/gshadow- h
/etc/ppp/chap-secrets h
/etc/ppp/pap-secrets h
/etc/samba/smbpasswd h
/lib rx
/mnt r
/usr h
/usr/X11R6 rx
/usr/bin rx
/usr/local h
/usr/local/lib
/usr/local/man
/usr/sbin h
/usr/sbin/chroot x
/usr/share r
/usr/lib rx
/var h
/var/cache/man/X11R6/index.db r
/var/cache/man/index.db r
/var/cache/man/oldlocal/index.db r
/var/run
/SYSV0056a8bd x
/SYSV0056a8be x
/dev
/dev/snd h
/dev/snd/controlC0 rw
/dev/snd/pcmC0D0p rxw
/dev/snd/timer r
/dev/null w
/dev/ptmx rw
/dev/pts rw
/dev/tty rw
/dev/grsec h
/dev/log h
/dev/mem h
/dev/kmem h
/dev/port h
/home
/home/owen r
/home/owen/.Xauthority rw
/home/owen/.Xauthority-c wcd
/home/owen/.Xauthority-l wcdl
/home/owen/.fluxbox
/home/owen/.fluxbox/keys r
/home/owen/.nano_history rw
/home/owen/firefox
/proc r
/proc/kcore h
/proc/bus h
/tmp rxwcd
/sys h
-CAP_ALL
bind disabled
connect disabled
}
Posted:
Sun Nov 27, 2005 12:40 pm
by spender
/usr/sbin h
/usr/sbin/chroot x
You need to add an /usr/sbin/hddtemp x object to this subject.
-Brad
Posted:
Sun Nov 27, 2005 12:58 pm
by pesadilla
yes, works now. thanks for all. i wrote it in subject default, but i forgot put in user too