Today I upgraded VirtualBox from 5.0.26 to 5.1.10. I am running gentoo linux with kernel 4.7.10.
Unfortunately vboxwebsrv and VBoxManage just segfault rather instantly.
Code: Select all
tomb ~ # VBoxManage list vms
Segmentation fault
tomb ~ # vboxwebsrv
Oracle VM VirtualBox web service Version 5.1.10
(C) 2007-2016 Oracle Corporation
All rights reserved.
VirtualBox web service 5.1.10 r112026 linux.amd64 (Nov 21 2016 17:41:59) release log
00:00:00.000115 main Log opened 2016-12-10T19:17:33.193726000Z
00:00:00.000117 main Build Type: release
00:00:00.000120 main OS Product: Linux
00:00:00.000122 main OS Release: 4.7.10-hardened
00:00:00.000123 main OS Version: #1 SMP Sat Dec 10 14:30:44 CET 2016
00:00:00.000152 main DMI Product Name: System Product Name
00:00:00.000160 main DMI Product Version: System Version
00:00:00.000232 main Host RAM: 16017MB (15.6GB) total, 15216MB (14.8GB) available
00:00:00.000238 main Executable: /opt/VirtualBox/vboxwebsrv
00:00:00.000239 main Process ID: 16560
00:00:00.000240 main Package type: LINUX_64BITS_GENERIC
00:00:00.008421 main IPC socket path: /tmp/.vbox-root-ipc/ipcd
Segmentation fault
tomb ~ #
Code: Select all
tomb ~ # strace vboxwebsrv
execve("/opt/bin/vboxwebsrv", ["vboxwebsrv"], [/* 22 vars */]) = 0
brk(0) = 0x666b09c530
[...]
stat("/opt/VirtualBox/components/VBoxNetDHCP.so", {st_mode=S_IFREG|0644, st_size=159576, ...}) = 0
stat("/opt/VirtualBox/components/VBoxNetDHCP.so", {st_mode=S_IFREG|0644, st_size=159576, ...}) = 0
open("/opt/VirtualBox/components/VBoxNetDHCP.so", O_RDONLY|O_CLOEXEC) = 9
read(9, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\224\0\0\0\0\0\0"..., 832) = 832
fstat(9, {st_mode=S_IFREG|0644, st_size=159576, ...}) = 0
mmap(NULL, 2254912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0) = 0x3ea74c8f000
mprotect(0x3ea74cb2000, 2097152, PROT_NONE) = 0
mmap(0x3ea74eb2000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x23000) = 0x3ea74eb2000
close(9) = 0
mprotect(0x3ea74eb2000, 4096, PROT_READ) = 0
stat("/opt/VirtualBox/components/VBoxREM.so", {st_mode=S_IFREG|0644, st_size=715040, ...}) = 0
stat("/opt/VirtualBox/components/VBoxREM.so", {st_mode=S_IFREG|0644, st_size=715040, ...}) = 0
open("/opt/VirtualBox/components/VBoxREM.so", O_RDONLY|O_CLOEXEC) = 9
read(9, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\257\0\0\0\0\0\0"..., 832) = 832
fstat(9, {st_mode=S_IFREG|0644, st_size=715040, ...}) = 0
close(9) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x50} ---
+++ killed by SIGSEGV +++
Segmentation fault
tomb ~ #
Code: Select all
tomb ~ # gdb /opt/VirtualBox/vboxwebsrv
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
[...]
Reading symbols from /opt/VirtualBox/vboxwebsrv...(no debugging symbols found)...done.
(gdb) run
Starting program: /opt/VirtualBox/vboxwebsrv
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 "/lib64/libthread_db.so.1".
[New Thread 0x36241e51700 (LWP 16695)]
[New Thread 0x36241650700 (LWP 16696)]
[Thread 0x36241650700 (LWP 16696) exited]
[Thread 0x36241e51700 (LWP 16695) exited]
Oracle VM VirtualBox web service Version 5.1.10
(C) 2007-2016 Oracle Corporation
All rights reserved.
VirtualBox web service 5.1.10 r112026 linux.amd64 (Nov 21 2016 17:41:59) release log
00:00:00.000121 main Log opened 2016-12-10T19:22:07.575784000Z
00:00:00.000123 main Build Type: release
00:00:00.000132 main OS Product: Linux
00:00:00.000134 main OS Release: 4.7.10-hardened
00:00:00.000135 main OS Version: #1 SMP Sat Dec 10 14:30:44 CET 2016
00:00:00.000170 main DMI Product Name: System Product Name
00:00:00.000181 main DMI Product Version: System Version
00:00:00.000254 main Host RAM: 16017MB (15.6GB) total, 15195MB (14.8GB) available
00:00:00.000262 main Executable: /opt/VirtualBox/vboxwebsrv
00:00:00.000263 main Process ID: 16690
00:00:00.000264 main Package type: LINUX_64BITS_GENERIC
00:00:00.016690 main IPC socket path: /tmp/.vbox-root-ipc/ipcd
[New Thread 0x36244152700 (LWP 16703)]
[New Thread 0x36244131700 (LWP 16704)]
Program received signal SIGSEGV, Segmentation fault.
0x0000036243f58163 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) bt full
#0 0x0000036243f58163 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#1 0x0000036243f60bf1 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#2 0x0000036243f5bd41 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#3 0x0000036243f600c2 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#4 0x0000036242152002 in ?? () from /lib64/libdl.so.2
No symbol table info available.
#5 0x0000036243f5bd41 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#6 0x00000362421526a9 in ?? () from /lib64/libdl.so.2
No symbol table info available.
#7 0x00000362421520b2 in dlopen () from /lib64/libdl.so.2
No symbol table info available.
#8 0x0000036243357daa in VBoxNsprPR_LoadLibraryWithFlags () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#9 0x0000036243357ea7 in VBoxNsprPR_LoadLibrary () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#10 0x000003624330ce24 in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#11 0x0000036243323d0f in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#12 0x0000036243324991 in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#13 0x0000036243325fdb in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#14 0x000003624332446a in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#15 0x00000362433242d6 in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#16 0x0000036243327fab in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#17 0x0000036243328395 in ?? () from /opt/VirtualBox/VBoxXPCOM.so
No symbol table info available.
#18 0x0000000000ee39a8 in ?? ()
No symbol table info available.
#19 0x000000000040a3c3 in ?? ()
No symbol table info available.
#20 0x00000362429cd734 in __libc_start_main () from /lib64/libc.so.6
No symbol table info available.
#21 0x0000000000407559 in ?? ()
No symbol table info available.
#22 0x000003c8b16192f8 in ?? ()
No symbol table info available.
#23 0x000000000000001c in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
Code: Select all
tomb ~ # paxctl -v /opt/VirtualBox/vboxwebsrv
PaX control v0.9
Copyright 2004,2005,2006,2007,2009,2010,2011,2012,2014 PaX Team <pageexec@freemail.hu>
file /opt/VirtualBox/vboxwebsrv is not a valid ELF executable (invalid PT_ entry:8)
tomb ~ #
Code: Select all
tomb ~ # readelf -l /opt/VirtualBox/vboxwebsrv
Elf file type is EXEC (Executable file)
Entry point 0x407530
There are 9 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
0x00000000000001f8 0x00000000000001f8 R E 8
INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238
0x000000000000001c 0x000000000000001c R 1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x0000000001151e6c 0x0000000001151e6c R E 200000
LOAD 0x0000000001152a38 0x0000000001752a38 0x0000000001752a38
0x0000000000003618 0x0000000000003a28 RW 200000
DYNAMIC 0x0000000001153d90 0x0000000001753d90 0x0000000001753d90
0x00000000000001f0 0x00000000000001f0 RW 8
NOTE 0x0000000000000254 0x0000000000400254 0x0000000000400254
0x0000000000000020 0x0000000000000020 R 4
GNU_EH_FRAME 0x0000000000e8af00 0x000000000128af00 0x000000000128af00
0x0000000000000008 0x0000000000000008 R 4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 8
GNU_RELRO 0x0000000001152a38 0x0000000001752a38 0x0000000001752a38
0x0000000000001548 0x0000000000001538 R 1
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .gcc_except_table
03 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss
04 .dynamic
05 .note.ABI-tag
06 .eh_frame_hdr
07
08 .ctors .dtors .jcr .data.rel.ro
tomb ~ #
Currently I don't see any way for getting VirtualBox running on a PaX enabled system. Or am I missing something? Are the segfaults even related to PaX?GNU_RELRO 0x0000000001152a38 0x0000000001752a38 0x0000000001752a38
0x0000000000001548 0x0000000000001538 R 1
this was the entry that paxctl complained about, and for a good
reason: filesz > memsz which while causes no apparent problem on
loading the binary, is still not good because it means the linker
put something into the file which will not be loaded into memory
at runtime (or rather, it will be in this particular case, but it
still points at a bug somewhere in the linker).
I'll gladly provide more information if needed!
Thanks for your help!