From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8MokFv9XgmIXXAAAbAwnHQ (envelope-from ) for ; Mon, 16 May 2022 15:56:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cKQgFv9XgmIPdgAAauVa8A (envelope-from ) for ; Mon, 16 May 2022 15:56:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8EF013C677 for ; Mon, 16 May 2022 15:56:14 +0200 (CEST) Received: from localhost ([::1]:39804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqbCn-0004FT-Hh for larch@yhetil.org; Mon, 16 May 2022 09:56:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqbAh-0002vO-8g for bug-guix@gnu.org; Mon, 16 May 2022 09:54:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqbAg-0007kd-Mh for bug-guix@gnu.org; Mon, 16 May 2022 09:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nqbAg-00007d-Kx for bug-guix@gnu.org; Mon, 16 May 2022 09:54:02 -0400 Subject: bug#55450: bitlbee running as root Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Mon, 16 May 2022 13:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 55450 X-GNU-PR-Package: guix X-GNU-PR-Keywords: security To: 55450-done@debbugs.gnu.org Mail-Followup-To: 55450@debbugs.gnu.org, ludo@gnu.org, ludo@gnu.org Received: via spool by 55450-done@debbugs.gnu.org id=D55450.1652709239453 (code D ref 55450); Mon, 16 May 2022 13:54:02 +0000 Received: (at 55450-done) by debbugs.gnu.org; 16 May 2022 13:53:59 +0000 Received: from localhost ([127.0.0.1]:52204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqbAc-00007E-RF for submit@debbugs.gnu.org; Mon, 16 May 2022 09:53:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nqbAV-00006p-7Z for 55450-done@debbugs.gnu.org; Mon, 16 May 2022 09:53:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqbAP-0007jl-9q for 55450-done@debbugs.gnu.org; Mon, 16 May 2022 09:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=HAyN6xf63uHk8gOYELm9Err38uw0F266FhUnLXRqPYM=; b=qAdeSCgNQkDk+gFYnq8J i/NNHcRryQGL25rkL0KZo3AI9u1vozZPMmevPuf5vpEh0HzzhlQe76Hv8iJhlAI9x6KiJD2Woae+G enjB+SALtChoPKuHkkh7MfvFsv9QzQWGosjHi08M5C6pAEJr0epoCiDxG8+GtqN3icKOMUfzZAy1G i8Ntcn/ocya5LX3UHqiU0hKaD2ufrtddLt2QwDb74ZscnU8fPs1xzaOaG0BvDXdTlx8jcIYkLaGW8 4s+dOYYq6YE56XrHsr9mjYz2nD3pnxPbAph+t05nyZXMkK4Ilv/PwgiXL/9yeBUqdRI5vqeKwvWWV y9nDTN1si4aSTA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62539 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqbAN-00027C-GY for 55450-done@debbugs.gnu.org; Mon, 16 May 2022 09:53:44 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874k1pa9lh.fsf@inria.fr> Date: Mon, 16 May 2022 15:53:42 +0200 In-Reply-To: <874k1pa9lh.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 16 May 2022 15:30:18 +0200") Message-ID: <87lev18ty1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652709374; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HAyN6xf63uHk8gOYELm9Err38uw0F266FhUnLXRqPYM=; b=pXZxSoc18oj1WktkQwbodY9tJR/0AffHYPPZVbvUn8Lk4B0gh7Ub6x1BvG7TUL7zob8TIZ vce2gxNv5jdpAkHGOKKvVG+4+8vAU4OJdaN9wfOY1LHTSo8p798VUtbl5ogOl6R/fWGV+t OlaqyuH5+Nr7eIjuaUXqOV0F1bgrtJhYI355tc0rPNQeEniHIPiDKKrrlghni/bLuv96wR +KE+ChBiMrDRpm/lJshoxI3XvnPAk0MFKdFiJKjyRLiClpb555ja/kL7eMKjEOCQ+GlAGF /CqsKbIRFJHgmPGSOYKWKx4uWvGN5qkeTz0WZrzGyHAfIPWp/2B5tN3yYtpZag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652709374; a=rsa-sha256; cv=none; b=WK+PIk4jyINUhfLRRd2yOzQ+eUFLPbo3zG9wjK9zYTbszWjjzZqUzoKxeeXBSSk+WEarOJ Fim4DnHZMVzMxAE+TuoUeIy7qW4VoU7y6QjskCQ+te7nEtMQUSSbniEVdhMd7jTLYc9mJx kxLFs5YKNfTv7FC94zim106fc0KRX75jB45GFfIZ2fIm4x/u2j+vnESUmqv5MJIFDSEj5F vn5T+UVJxdnl4+z4pKZh+M8HpGeHdn+tIS/BzK9BN/OshjozxI1MdvaFSBGZyisuJ8UR10 22T5FHYC0T+wLSrhYNnKrWgtRqVJH/vdAGqOAB6wfUAtdVfpYtaHOaxcsCcOdw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qAdeSCgN; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qAdeSCgN; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8EF013C677 X-Spam-Score: -3.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: D+G45605Cu/B Ludovic Court=C3=A8s skribis: > Starting from commit 211fe3f66e6dfdaa64974931c458ab1d92afc182, if PID=C2= =A01 > is Shepherd 0.9.0, the bitlbee daemon was started on-demand as an inetd > service. > > However, due to a logic bug, it was running as root (in a separate user > namespace though) instead of running as =E2=80=9Cbitlbee=E2=80=9D. The b= ug is that we > were spawning =E2=80=9Cbitlbee -u bitlbee=E2=80=9D as root; normally, bit= lbee would > setuid to the =E2=80=9Cbitlbee=E2=80=9D user early on, but since it was i= n a separate > namespace and with a minimal /etc/passwd, it couldn=E2=80=99t do anything= and > kept the current UID (that UID was 1000 inside the user namespace, but 0 > outside). Fixed by commit ecfcdff23a5ce390a7edc019c1f1216c4843dc04: the bitlbee process is now started as =E2=80=9Cbitlbee=E2=80=9D right from the start. I reviewed other users of =E2=80=98least-authority-wrapper=E2=80=99 that we= re recently introduced and didn=E2=80=99t see other mistakes of that kind. You=E2=80= =99re welcome to take another look to make sure! Ludo=E2=80=99.