Received: from eggs.gnu.org ([2001:4830:134:3::10]:51871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asvUs-00085a-Ip for qemu-devel@nongnu.org; Wed, 20 Apr 2016 13:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asvUp-0002Tj-DJ for qemu-devel@nongnu.org; Wed, 20 Apr 2016 13:01:02 -0400 Received: from indium.canonical.com ([91.189.90.7]:58428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asvUp-0002TX-7K for qemu-devel@nongnu.org; Wed, 20 Apr 2016 13:00:59 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1asvUn-0002mr-Hz for ; Wed, 20 Apr 2016 17:00:57 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 857042E80BB for ; Wed, 20 Apr 2016 17:00:57 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Apr 2016 16:54:25 -0000 From: Serge Hallyn <1525676@bugs.launchpad.net> Reply-To: Bug 1525676 <1525676@bugs.launchpad.net> Sender: bounces@canonical.com References: <20151213173042.25355.35514.malonedeb@soybean.canonical.com> Message-Id: <20160420165425.5514.82209.launchpad@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1525676] Re: qemu runas and sandbox option incompatible, process will hang in futex after setgid List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Also affects: qemu Importance: Undecided Status: New ** Changed in: qemu (Ubuntu) Status: New =3D> Triaged ** Changed in: qemu (Ubuntu) Importance: Undecided =3D> Wishlist -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1525676 Title: qemu runas and sandbox option incompatible, process will hang in futex after setgid Status in QEMU: New Status in qemu package in Ubuntu: Triaged Bug description: With -runas [user] and -sandbox on, qemu process will fail in the process of dropping privileges. While setgid() is done (see below), setuid() is not attempted. Instead process blocks waiting for a futex never to come. [pid 21769] +++ killed by SIGSYS +++ [pid 21767] <... tgkill resumed> ) =3D 0 [pid 21767] tgkill(21767, 21768, SIGRT_1 [pid 21768] <... nanosleep resumed> {0, 7284187}) =3D ? ERESTART_RESTARTB= LOCK (Interrupted by signal) [pid 21768] --- SIGRT_1 {si_signo=3DSIGRT_1, si_code=3DSI_TKILL, si_pid= =3D21767, si_uid=3D0} --- [pid 21768] setgid(100) =3D 0 [pid 21768] futex(0x7f7f0f53fd1c, FUTEX_WAKE_PRIVATE, 1) =3D 0 [pid 21768] rt_sigreturn() =3D -1 EINTR (Interrupted system = call) [pid 21768] nanosleep({0, 7284187}, [pid 21767] <... tgkill resumed> ) =3D 0 [pid 21767] futex(0x7ffd5a9b6890, FUTEX_WAIT_PRIVATE, 3, NULL [pid 21768] <... nanosleep resumed> 0x7f7f0f53eb00) =3D 0 [pid 21768] futex(0x55f52acd1f44, FUTEX_WAIT, 4294967295, NULL This bug might be addresses in the discussion/patchset http://qemu.11.n7.nabble.com/PATCH-Add-syscalls-for-runas-and-chroot- to-the-seccomp-sandbox-td359588.html # lsb_release -rd Description: Ubuntu 15.10 Release: 15.10 # apt-cache policy qemu-system-x86 qemu-system-x86: Installed: 1:2.3+dfsg-5ubuntu9.1 Candidate: 1:2.3+dfsg-5ubuntu9.1 Version table: *** 1:2.3+dfsg-5ubuntu9.1 0 500 http://archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Pac= kages 500 http://archive.ubuntu.com/ubuntu/ wily-security/main amd64 Pa= ckages 100 /var/lib/dpkg/status 1:2.3+dfsg-5ubuntu9 0 500 http://archive.ubuntu.com/ubuntu/ wily/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1525676/+subscriptions