[solved] Xorg 1.8 problem
Posted: Mon Aug 09, 2010 6:36 am
[edited, see bottom at this post] Hi,
not able to start Xorg after upgrade to "xorg-server 1.8.99.904" (from xorg-server-1.7.6 which was working as expected using grsec/pax/rbac)
It runs fine with grsec rbac disabled.
From shell that starts Xorg:
#---
X.Org X Server 1.8.1.902 (1.8.2 RC 2)
Release Date: 2010-06-21
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.34-ARCH x86_64
Current Operating System: Linux spunk 2.6.34.1-grsec #1 SMP PREEMPT Fri Aug 6 15:09:36 CEST 2010 x86_64
Kernel command line: root=/dev/sda3 ro
Build Date: 21 June 2010 12:01:49PM
Current version of pixman: 0.18.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Aug 9 12:15:02 2010
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
intel_bufmgr_gem.c:962: Error mapping buffer 8 (gen4 SF state): Permission denied .
Backtrace:
0: /usr/bin/X (xorg_backtrace+0x28) [0x498588]
1: /usr/bin/X (0x400000+0x672d9) [0x4672d9]
2: /lib/libpthread.so.0 (0x39f6c525000+0xf1c0) [0x39f6c5341c0]
3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x22528) [0x39f698f7528]
4: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x24e6a) [0x39f698f9e6a]
5: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x11d78) [0x39f698e6d78]
6: /usr/bin/X (AddScreen+0x19d) [0x42846d]
7: /usr/bin/X (InitOutput+0x217) [0x46f757]
8: /usr/bin/X (0x400000+0x21595) [0x421595]
9: /lib/libc.so.6 (__libc_start_main+0xfd) [0x39f6b4b8c4d]
10: /usr/bin/X (0x400000+0x212f9) [0x4212f9]
Segmentation fault at address (nil)
Fatal server error:
Caught signal 11 (Segmentation fault). Server aborting
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
#---
from dmesg:
grsec: (myuser:U:/usr/bin/Xorg) denied load of writable library /drm mm object by /usr/bin/Xorg[X:23799] uid/euid:666/0 gid/egid:100/100, parent /usr/bin/xinit[xinit:23798] uid/euid:666/666 gid/egid:100/100
grsec: (myuser:U:/usr/bin/Xorg) Segmentation fault occurred at (null) in /usr/bin/Xorg[X:23799] uid/euid:666/0 gid/egid:100/100, parent /usr/bin/xinit[xinit:23798] uid/euid:666/666 gid/egid:100/100
Not sure where /drm should be read/written/loaded (seems like a memory mapping?)
Policy for myuser
subject /usr/bin/Xorg o {
user_transition_allow root myuser
group_transition_allow users
/ h
/bin h
/bin/bash x
/etc h
/etc/X11/xorg.conf r
/etc/X11/xorg.conf.d r
/etc/ld.so.cache rx
/etc/localtime r
/lib rx
/lib/modules rx
/lib/modules/2.4.6.34.1-grsec r
/lib/modules/2.4.6.34.1-grseci/modules.dep.bin rx
/lib/modules/2.6.34.1-grsec/modules.dep r
/proc h
/proc/cmdline r
/proc/meminfo r
/proc/mtrr w
/proc/sys/kernel/modprobe r
/sys r
/usr h
/usr/bin h
/usr/bin/xinit rx
/usr/bin/Xorg rx
/usr/lib rx
/usr/lib/xorg/modules rx
/usr/share r
/var h
/var/lib/xkb
/var/log
/var/log/Xorg.0.log rwcd
/var/log/Xorg.0.log.old rwcd
/var/run/dbus/system_bus_socket rw
/sbin/modprobe rx
/dev
/dev/input rw
/dev/dri
/dev/dri/card0 rw
/dev/tty0 w
/dev/tty7 rw
/dev/vga_arbiter rw
/dev/grsec h
/dev/mem h
/dev/kmem h
/dev/port h
/dev/log h
/tmp rwcdl
-CAP_ALL
+CAP_CHOWN
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_RAWIO
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
-PAX_SEGMEXEC
-PAX_PAGEEXEC
-PAX_MPROTECT
bind disabled
connect disabled
}
Pax settings on the binary:
$ paxctl -v /usr/bin/Xorg
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team <pageexec@freemail.hu>
- PaX flags: -p-s-m-x-e-r [/usr/bin/Xorg]
PAGEEXEC is disabled
SEGMEXEC is disabled
MPROTECT is disabled
RANDEXEC is disabled
EMUTRAMP is disabled
RANDMMAP is disabled
$
Any suggestions?
Running latest test patch available "grsecurity-2.2.0-2.6.34.1-201007162107.patch
Best Regards,
franz
Keep up the good work!!
[edited]
May be my misstake!
CONFIG_GRKERNSEC_KMEM=y
in kernel config.
I will recompile the kernel
/franz
not able to start Xorg after upgrade to "xorg-server 1.8.99.904" (from xorg-server-1.7.6 which was working as expected using grsec/pax/rbac)
It runs fine with grsec rbac disabled.
From shell that starts Xorg:
#---
X.Org X Server 1.8.1.902 (1.8.2 RC 2)
Release Date: 2010-06-21
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.34-ARCH x86_64
Current Operating System: Linux spunk 2.6.34.1-grsec #1 SMP PREEMPT Fri Aug 6 15:09:36 CEST 2010 x86_64
Kernel command line: root=/dev/sda3 ro
Build Date: 21 June 2010 12:01:49PM
Current version of pixman: 0.18.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Aug 9 12:15:02 2010
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
intel_bufmgr_gem.c:962: Error mapping buffer 8 (gen4 SF state): Permission denied .
Backtrace:
0: /usr/bin/X (xorg_backtrace+0x28) [0x498588]
1: /usr/bin/X (0x400000+0x672d9) [0x4672d9]
2: /lib/libpthread.so.0 (0x39f6c525000+0xf1c0) [0x39f6c5341c0]
3: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x22528) [0x39f698f7528]
4: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x24e6a) [0x39f698f9e6a]
5: /usr/lib/xorg/modules/drivers/intel_drv.so (0x39f698d5000+0x11d78) [0x39f698e6d78]
6: /usr/bin/X (AddScreen+0x19d) [0x42846d]
7: /usr/bin/X (InitOutput+0x217) [0x46f757]
8: /usr/bin/X (0x400000+0x21595) [0x421595]
9: /lib/libc.so.6 (__libc_start_main+0xfd) [0x39f6b4b8c4d]
10: /usr/bin/X (0x400000+0x212f9) [0x4212f9]
Segmentation fault at address (nil)
Fatal server error:
Caught signal 11 (Segmentation fault). Server aborting
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
#---
from dmesg:
grsec: (myuser:U:/usr/bin/Xorg) denied load of writable library /drm mm object by /usr/bin/Xorg[X:23799] uid/euid:666/0 gid/egid:100/100, parent /usr/bin/xinit[xinit:23798] uid/euid:666/666 gid/egid:100/100
grsec: (myuser:U:/usr/bin/Xorg) Segmentation fault occurred at (null) in /usr/bin/Xorg[X:23799] uid/euid:666/0 gid/egid:100/100, parent /usr/bin/xinit[xinit:23798] uid/euid:666/666 gid/egid:100/100
Not sure where /drm should be read/written/loaded (seems like a memory mapping?)
Policy for myuser
subject /usr/bin/Xorg o {
user_transition_allow root myuser
group_transition_allow users
/ h
/bin h
/bin/bash x
/etc h
/etc/X11/xorg.conf r
/etc/X11/xorg.conf.d r
/etc/ld.so.cache rx
/etc/localtime r
/lib rx
/lib/modules rx
/lib/modules/2.4.6.34.1-grsec r
/lib/modules/2.4.6.34.1-grseci/modules.dep.bin rx
/lib/modules/2.6.34.1-grsec/modules.dep r
/proc h
/proc/cmdline r
/proc/meminfo r
/proc/mtrr w
/proc/sys/kernel/modprobe r
/sys r
/usr h
/usr/bin h
/usr/bin/xinit rx
/usr/bin/Xorg rx
/usr/lib rx
/usr/lib/xorg/modules rx
/usr/share r
/var h
/var/lib/xkb
/var/log
/var/log/Xorg.0.log rwcd
/var/log/Xorg.0.log.old rwcd
/var/run/dbus/system_bus_socket rw
/sbin/modprobe rx
/dev
/dev/input rw
/dev/dri
/dev/dri/card0 rw
/dev/tty0 w
/dev/tty7 rw
/dev/vga_arbiter rw
/dev/grsec h
/dev/mem h
/dev/kmem h
/dev/port h
/dev/log h
/tmp rwcdl
-CAP_ALL
+CAP_CHOWN
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_RAWIO
+CAP_SYS_ADMIN
+CAP_SYS_TTY_CONFIG
-PAX_SEGMEXEC
-PAX_PAGEEXEC
-PAX_MPROTECT
bind disabled
connect disabled
}
Pax settings on the binary:
$ paxctl -v /usr/bin/Xorg
PaX control v0.5
Copyright 2004,2005,2006,2007 PaX Team <pageexec@freemail.hu>
- PaX flags: -p-s-m-x-e-r [/usr/bin/Xorg]
PAGEEXEC is disabled
SEGMEXEC is disabled
MPROTECT is disabled
RANDEXEC is disabled
EMUTRAMP is disabled
RANDMMAP is disabled
$
Any suggestions?
Running latest test patch available "grsecurity-2.2.0-2.6.34.1-201007162107.patch
Best Regards,
franz
Keep up the good work!!
[edited]
May be my misstake!
CONFIG_GRKERNSEC_KMEM=y
in kernel config.
I will recompile the kernel
/franz