From owner-freebsd-emulation@FreeBSD.ORG Tue Dec 17 22:48:29 2013 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F28AE434 for ; Tue, 17 Dec 2013 22:48:28 +0000 (UTC) Received: from mail-oa0-x230.google.com (mail-oa0-x230.google.com [IPv6:2607:f8b0:4003:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B3AEC151B for ; Tue, 17 Dec 2013 22:48:28 +0000 (UTC) Received: by mail-oa0-f48.google.com with SMTP id l6so7320786oag.7 for ; Tue, 17 Dec 2013 14:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=D45wK09Ia79nngfBBdNvA4Sj0wh47cGuBljZr/FyMLM=; b=GhXQ1xZCT3qGsMbDF89u7A0vKuPWxgIph1IV1Gspw7sayMQL7CmpbaZ9ZVnPVr0jum kbaujkcCqkr4UZ6AZMdTC8vg0TxtfYLqISZw56OElycueE3MJ7hC32D3tVzyFDTON7fu K8EsiPoAJg0vRFvvwZ1SRlOvsMHtH+qtgDTcF1vC1ID6Rb9Xtv/mpWPn/MUf7DWnPUEK nIrSDouwyPSerZWM71cUXDLfO3qtUuq7vGb0p8/sG8dVLeNQDnpEkhpXLEQu+fkO5AnW ujmW3z/0H7CSA9GSlrWlySEVuw1Ih1/bTApg7MQ0VHm9L7m1u1NgJ5HDXSc8CjYlW4Je cbog== X-Received: by 10.182.43.161 with SMTP id x1mr17961825obl.5.1387320507967; Tue, 17 Dec 2013 14:48:27 -0800 (PST) Received: from [192.168.0.115] (sutvfirewall.sumnercomm.net. [69.24.208.18]) by mx.google.com with ESMTPSA id r6sm28133599obi.14.2013.12.17.14.48.26 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 17 Dec 2013 14:48:27 -0800 (PST) Message-ID: <1387320505.7853.3.camel@localhost> Subject: Re: virtualbox-ose segfaults on 10.0 From: Joe Maloney To: Bernhard =?ISO-8859-1?Q?Fr=F6hlich?= Date: Tue, 17 Dec 2013 16:48:25 -0600 In-Reply-To: References: <1386879841.99920.9.camel@localhost> <0A5D3966-A5A0-4CB2-84DE-A41022674E9E@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: "freebsd-emulation@freebsd.org" X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2013 22:48:29 -0000 No problem. I still get the segfault even with new patch unfortunatley. I did confirm the installed port revision was virtualbox-ose-4.2.20_2. Below are the results you asked for from ldd + readelf. If you need me to test more just let me know. Joe Maloney [jmaloney@jm-desk-pc] ~% sudo ldd /usr/local/bin/VirtualBox /usr/local/bin/VirtualBox: libthr.so.3 => /lib/libthr.so.3 (0x800822000) libstdc++.so.6 => /usr/local/lib/gcc46/libstdc++.so.6 (0x800a47000) libm.so.5 => /lib/libm.so.5 (0x800d4b000) libgcc_s.so.1 => /usr/local/lib/gcc46/libgcc_s.so.1 (0x800f71000) libc.so.7 => /lib/libc.so.7 (0x801186000) [jmaloney@jm-desk-pc] ~% sudo readelf -d /usr/local/bin/VirtualBox Dynamic section at offset 0x7028 contains 25 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libthr.so.3] 0x0000000000000001 (NEEDED) Shared library: [libstdc ++.so.6] 0x0000000000000001 (NEEDED) Shared library: [libm.so.5] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.7] 0x000000000000000f (RPATH) Library rpath: [/usr/local/lib/gcc46:/usr/local/lib/virtualbox] 0x000000000000000c (INIT) 0x400e48 0x000000000000000d (FINI) 0x404d08 0x0000000000000004 (HASH) 0x400248 0x0000000000000005 (STRTAB) 0x4007f0 0x0000000000000006 (SYMTAB) 0x4003a0 0x000000000000000a (STRSZ) 465 (bytes) 0x000000000000000b (SYMENT) 24 (bytes) 0x0000000000000015 (DEBUG) 0x0 0x0000000000000003 (PLTGOT) 0x607208 0x0000000000000002 (PLTRELSZ) 960 (bytes) 0x0000000000000014 (PLTREL) RELA 0x0000000000000017 (JMPREL) 0x400a88 0x0000000000000007 (RELA) 0x400a70 0x0000000000000008 (RELASZ) 24 (bytes) 0x0000000000000009 (RELAENT) 24 (bytes) 0x000000006ffffffe (VERNEED) 0x400a20 0x000000006fffffff (VERNEEDNUM) 2 0x000000006ffffff0 (VERSYM) 0x4009c2 0x0000000000000000 (NULL) 0x0 On Tue, 2013-12-17 at 22:02 +0100, Bernhard Fröhlich wrote: > Thanks a lot for your help! I have committed a patch now that should fix this > issue once and for all. > > http://svnweb.freebsd.org/ports?view=revision&revision=336768 > > The analysis has shown that the vbox buildsystem has a strange check as > part of their hardening that strips away rpath for Hardened-R3 > binaries. It looks > like that is supposed to protect against world writable RPATH paths which would > allow a user to inject malicious shared objects. Our gcc48 path is definitely a > safe place so I decided to disable that check for FreeBSD. > > I will send that patch upstream and discuss the implications with the vbox > developers to see if that has some additional risks. > > > On Sat, Dec 14, 2013 at 1:25 AM, Joe Maloney wrote: > > [jmaloney@jm-desk-pc] ~% sudo ldd /usr/local/bin/VirtualBox > > Password: > > /usr/local/bin/VirtualBox: > > libthr.so.3 => /lib/libthr.so.3 (0x800822000) > > libstdc++.so.6 => /usr/local/lib/gcc46/libstdc++.so.6 (0x800a47000) > > libm.so.5 => /lib/libm.so.5 (0x800d4b000) > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800f71000) > > libc.so.7 => /lib/libc.so.7 (0x80117e000) > > > > On Dec 13, 2013, at 5:02 PM, Bernhard Fröhlich wrote: > > > > > > Am 12.12.2013 21:24 schrieb "Joe Maloney" : > >> > >> I cannot get the qt4 interface to start in FreeBSD 10. VboxManage seems > >> to work fine. This was just tested with the latest port a few hours ago > >> after Makefile change 336267 Virtualbox 4.2.20. Below is a backtrace. > >> > >> Joe Maloney > >> > >> [jmaloney@jm-desk-pc] ~% sudo gdb /usr/local/lib/virtualbox/VirtualBox > >> GNU gdb 6.1.1 [FreeBSD] > >> Copyright 2004 Free Software Foundation, Inc. > >> GDB is free software, covered by the GNU General Public License, and you > >> are > >> welcome to change it and/or distribute copies of it under certain > >> conditions. > >> Type "show copying" to see the conditions. > >> There is absolutely no warranty for GDB. Type "show warranty" for > >> details. > >> This GDB was configured as "amd64-marcel-freebsd"... > >> (gdb) run > >> Starting program: /usr/local/lib/virtualbox/VirtualBox > >> [New LWP 101456] > >> [New Thread 801c06400 (LWP 101456/VirtualBox)] > >> Type Manifest File: /root/.VirtualBox/xpti.dat > >> nsNativeComponentLoader: autoregistering begins. > >> nsNativeComponentLoader: autoregistering succeeded > >> nNCL: registering deferred (0) > >> [New Thread 801c11400 (LWP 100154/VirtualBox)] > >> [New Thread 801c0b400 (LWP 101680/VirtualBox)] > >> > >> Program received signal SIGSEGV, Segmentation fault. > >> [Switching to Thread 801c06400 (LWP 101456/VirtualBox)] > >> 0x0000000000000000 in ?? () > >> (gdb) backtrace > >> #0 0x0000000000000000 in ?? () > >> #1 0x0000000800afc072 in __dynamic_cast (src_ptr=0x7fffffffc7d0, > >> src_type=0x8080087c0, dst_type=0x808d1cea0, src2dst=0) > >> at ../../.././../gcc-4.6.4/libstdc++-v3/libsupc++/dyncast.cc:61 > >> #2 0x000000081142e759 in QtCurve::Style::eventFilter () > >> from /usr/local/lib/qt4/plugins/styles/qtcurve.so > >> #3 0x0000000807c987cd in > >> QCoreApplicationPrivate::sendThroughObjectEventFilters () > >> from /usr/local/lib/qt4/libQtCore.so.4 > >> #4 0x000000080822750a in QApplicationPrivate::notify_helper () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #5 0x000000080822a1f8 in QApplication::notify () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #6 0x0000000807c984e5 in QCoreApplication::notifyInternal () > >> from /usr/local/lib/qt4/libQtCore.so.4 > >> #7 0x0000000808266ec8 in QWidgetPrivate::propagatePaletteChange () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #8 0x000000080826baa1 in QWidget::setBackgroundRole () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #9 0x000000081142a33f in QtCurve::Style::polish () > >> from /usr/local/lib/qt4/plugins/styles/qtcurve.so > >> #10 0x0000000808273e21 in QWidget::event () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #11 0x000000080864567f in QMenuBar::event () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #12 0x000000080822751b in QApplicationPrivate::notify_helper () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #13 0x000000080822a1f8 in QApplication::notify () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #14 0x0000000807c984e5 in QCoreApplication::notifyInternal () > >> from /usr/local/lib/qt4/libQtCore.so.4 > >> #15 0x000000080826965e in QWidget::ensurePolished () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #16 0x000000080826970f in QWidget::ensurePolished () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #17 0x000000080824f39d in QLayout::totalMinimumSize () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #18 0x0000000808273569 in QWidget::minimumSizeHint () > >> from /usr/local/lib/qt4/libQtGui.so.4 > >> #19 0x000000080548c8cc in UISelectorWindow::loadSettings > >> (this=0x801ed4000) > >> > >> at > >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.20/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp:135 > >> #20 0x0000000805485d4e in UISelectorWindow (this=0x801ed4000, > >> ppSelf=0x805c98300, pParent=0x0, flags={i = -10976}) > >> > >> at > >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.20/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp:102 > >> #21 0x00000008053d32fa in VBoxGlobal::selectorWnd (this=0x805c981e0) > >> from /usr/local/lib/virtualbox/VirtualBox.so > >> #22 0x0000000805367f84 in TrustedMain (argc=1, argv=0x7fffffffd8b8) at > >> qglobal.h:1510 > >> #23 0x00000000004024cb in SUPR3HardenedMain (pszProgName=0x404d14 > >> "VirtualBox", fFlags=1, argc=1, argv=0x7fffffffd8b8, > >> envp=0x7fffffffd8c8) > >> > >> at > >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.20/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp:346 > >> #24 0x00000000004013cf in main (argc=1, argv=0x7fffffffd8b8, > >> envp=0x7fffffffd8c8) > >> > >> at > >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.20/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp:32 > > > > Could you please send me the output of: ldd /usr/local/binVirtualBox > > > > > > >