Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1522701lqp; Mon, 15 Apr 2024 08:47:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVmmB8HkCCVsGJsA+Le3g8xpNgIfk1uVvTtu7Rd2EnLLlLMlAi6yN/YimHfxUBAydTiF/OhmGGyjHrAd4vmDMFAps2ESylS0a9HHfPYKw== X-Google-Smtp-Source: AGHT+IFVkIK0Zzn4SNeB3rWs7oIAd0vO09nihZS1bzCPHq0VHl+/9Itd/WaFqtUaxHPtIpDRVDtd X-Received: by 2002:a05:620a:983:b0:78e:c789:af79 with SMTP id x3-20020a05620a098300b0078ec789af79mr59804qkx.18.1713196066364; Mon, 15 Apr 2024 08:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713196066; cv=none; d=google.com; s=arc-20160816; b=gjbUipkf3XbC61ZnkPYv3+aAGjbTWfVfOy34EA1SuXsXnGw5IE+3v81HAswFDd/lBv RbIqE3QB+vHzI2buwkLaloy+2ba4tajEqpEIX+yes+r60fzmyrp9bBRV5qwkegnmyMEB WOn3k1AV2eUy/VEmSTvIRnoHS97J50EqavtF1EFALcrY9mXW9hfj3+h7SPsg7tlHfulB FgoF6Yydz9azfOIj/u3e7tgGrK7piuvETyel4ewRRY1U35ebDfvBFtKQr7ntC6YTk5Pt Bb1lMIqEAKxSC5RTlKX1O8dWlmENLjWGJyN0EllftlRIUIVFmjKaME/wD0Q69EZ6njSW sI0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:in-reply-to:content-disposition:mime-version:references :message-id:to:from:date:dkim-signature:delivered-to:reply-to :list-id:list-subscribe:list-unsubscribe:list-help:list-post :precedence:mailing-list; bh=+gZSR4hYL6tizJSPZdHIb8w5Ah/cWqRTxibtfTryGbo=; fh=9jsPTyo6edd9xvAeG+KFFrRrXMmgB/RdwUKOrvy9dcA=; b=ZigrRfQfBq7bVoplQYxiVP1Q3OBMQZaYBr0RZ1ZJc5Din8oXq3gsjs0SyojqnCAPjx H3xz6kD9cHKSTRflYDCroK6DxZPk0VE6S8VGjYdpRZ83EPygopx9grPJJf3LaTUpV3Sy 43805o1masKoaLySmjSPvWZYgojU5p1B4Rqrjw50qO0iwRDaTKSOZkW2Bfl+2zvvx3Jb 0L69aJ8nYwwNy6J57+pa+V5TYmpFlp31ErVklENnx833EyNPqQefjRPeFvYaiTQNlrb+ ycoTapoT09J+tN4eY+jnbUZupFAhWo3agfVR/vBaE7CAqtnnB/AhkcLhZaTNFJj36fCa 51+w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@debian.org header.s=smtpauto.stravinsky header.b=ounZmegq; spf=pass (google.com: domain of oss-security-return-30030-linux.lists.archive=gmail.com@lists.openwall.com designates 193.110.157.125 as permitted sender) smtp.mailfrom="oss-security-return-30030-linux.lists.archive=gmail.com@lists.openwall.com" Return-Path: Received: from second.openwall.net (second.openwall.net. [193.110.157.125]) by mx.google.com with SMTP id g11-20020ae9e10b000000b0078d624a1e71si9800007qkm.719.2024.04.15.08.47.45 for ; Mon, 15 Apr 2024 08:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of oss-security-return-30030-linux.lists.archive=gmail.com@lists.openwall.com designates 193.110.157.125 as permitted sender) client-ip=193.110.157.125; Authentication-Results: mx.google.com; dkim=fail header.i=@debian.org header.s=smtpauto.stravinsky header.b=ounZmegq; spf=pass (google.com: domain of oss-security-return-30030-linux.lists.archive=gmail.com@lists.openwall.com designates 193.110.157.125 as permitted sender) smtp.mailfrom="oss-security-return-30030-linux.lists.archive=gmail.com@lists.openwall.com" Received: (qmail 9269 invoked by uid 550); 15 Apr 2024 15:47:29 -0000 Mailing-List: contact oss-security-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: oss-security@lists.openwall.com Delivered-To: mailing list oss-security@lists.openwall.com Received: (qmail 9246 invoked from network); 15 Apr 2024 15:47:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+gZSR4hYL6tizJSPZdHIb8w5Ah/cWqRTxibtfTryGbo=; b=ounZmegqHQQGEFI8Z7+wz2cXss Wg7DirnoPsOYRbKVmyY1Vjhzc4hnjfRMmn2yTXg8e3fY0ORgQ+EG/0OlmcqzHfY5rQWciPR4B1a0S Esa3AaBVeocm1Mi1H0TwIgQI1S7f+YwdNSOMGmnoHd0SUYuaFqfh29lr3sCHUrnhUP2Ixtx5VnQdq Kw3xyuqMeZMVmgWJfF8nAcIGMBh8MD0X3Q7XJZXKSnL3RiT8iyhOXgsffTO1ESOiNcIGyJO2CccFe /qGoGDrIuutiFp4S6Csht2Le2DwmB/nJhtU2/8anwURZxuMPUJwQn1+VvA++kBa3aSbjczoMUVRme fqDNVL/A==; Date: Mon, 15 Apr 2024 16:47:18 +0100 From: Simon McVittie To: oss-security@lists.openwall.com Message-ID: References: <20240414190855.GA12716@openwall.com> <20240415151309.GA15253@openwall.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240415151309.GA15253@openwall.com> X-Debian-User: smcv Subject: Re: [oss-security] Linux: Disabling network namespaces On Mon, 15 Apr 2024 at 17:13:09 +0200, Solar Designer wrote: > And/or make Debian's > kernel.unprivileged_userns_clone official upstream and use that. Why > did Debian choose to deprecate (but not yet drop?) theirs and go with > upstream's user.max_user_namespaces, which doesn't provide exactly the > same functionality? Was there an attempt at upstreaming? I am not a kernel developer, so this is second-hand information; but I believe the implementation of kernel.unprivileged_userns_clone used in Debian (and subsequently copied from Debian by various other distros) is derived from patches that were already proposed and rejected upstream, so the feeling was that trying again to upstream that feature would be a waste of time and upstream goodwill, because it would just get rejected again by the same kernel maintainer. kernel.unprivileged_userns_clone was a tradeoff between kernel attack surface and user-space attack surface. Disabling it mitigates various attacks that user-space can attempt on the kernel, but forces user-space sandboxing things (such as bubblewrap and the Chromium sandbox) to be setuid root if they are going to be used, which turns them into a user-space root privilege escalation risk. Conversely, with unprivileged namespaces, we can sandbox user-space processes without adding that risk, but we're relying on a larger kernel attack surface being secure. (Current versions of Debian still have the kernel.unprivileged_userns_clone patch, but it's left enabled by default, resulting in behaviour that is equivalent to upstream kernels.) smcv