Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3175943lqo; Tue, 21 May 2024 08:52:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDNAuZOY72WsqNfsOxx4xwbOF3f77gHC1hVgivuo4pr8rLNcU2G6mVUTrewGxhn8g7Cxc3lLBbnJO2iACaOWKOj3TblH2V9ArjSblamg== X-Google-Smtp-Source: AGHT+IHJjWtRF9u4bGEmmgRqP2PracRncVHZpnvAtyRRa3jlx7ffu5MYwpjviMcZ+3KzHsFBP9I3 X-Received: by 2002:a17:902:d501:b0:1f2:f090:b2bd with SMTP id d9443c01a7336-1f2f090ba5emr105549235ad.21.1716306759028; Tue, 21 May 2024 08:52:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716306759; cv=pass; d=google.com; s=arc-20160816; b=e7STZWA5Y8Pp0TIuYOgFQoFkZ0a7dtAguxOrD2vJHzlw87uZEhXel54EzNdIl/3QtM TxGCn5UJLtXVW7pUZtvflTgEbo7cYGZMhjf01dXbhfE8xUrL2MTdkxItSgNevsfl68P9 OdQn64L/kIIjimfxx73I90JVUiIah6l6GnU39qrrHd30YAr/7Q03kGSOySGHjpwE4fB2 xohO0qgQfTw8nKVF/q+T2Dar1us16/I+Xi+uCu0FBgqeb+7eV4YveZjyoXY8z0KyHMgf IwIZ8loIzfpC4p23pLgWvnEO6gKVzOj8H/uxDbsGIFsEMWriDPpCdlb2gJGcahuM3yos JO3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=kP6z+DgiQqeq0wyqIVgMsy730UPQ746toRzBhfDapGo=; fh=zkWavgzV1GsdyWolVJJHVzub88wvZ9v8BUilPwo/B7U=; b=djdLc+qfmWdGEbKN9LZATEMR4FScUIfEWhwb3EY4aG6HP8plyzlxSYXoCQh39YeQ0p uYTxubJQloUjTKUsFE5MLU8UOWBGSSRpGfxmQgtlwc2g012q/xAC7BoCDO/dMD8pnciV sOQ2Rar8w8bZSidcb+d8ZISkxU+ZGoqzZpcJqQDUJ1mPMXCTT2CvwJWH5dUzv8ckcRkh EEYHP0yPxz0s0vLcusu7SELF80mYbe08fbifNGG3vlGwSJisgH7H1ItEwWQPUSabyn2s tP8ptHBYMUETpPKy51hdYlZZdiyNtKZqrovq7MgMdQs+zDdXBsVxN5jkq0mZ6yrAImro D1rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=kMcu2v9y; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-185185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f306acfd70si27984825ad.547.2024.05.21.08.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 08:52:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=kMcu2v9y; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-185185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A81EE281748 for ; Tue, 21 May 2024 15:52:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48D4A148302; Tue, 21 May 2024 15:52:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="kMcu2v9y" Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CBB414291B; Tue, 21 May 2024 15:52:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.121 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716306742; cv=none; b=n5Vc5DMInNGDY66awJPM/EKKPzPI5myyG3E329pTcb78lRGjTXwyicNDbQaldL7/HHiuA92++3clg+rFX9misNH18GJEAisjCbuiaLN+UnBlyBTAsVPZzEO62QIl5aQeelHpKh8vrqxrGPQazMpSD66KBqRCWPAGXw2QlpNiKGQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716306742; c=relaxed/simple; bh=D8ut8wqbZAYfrDBXoK5kyNG9XiWyMeVsnRjM5LnSrQs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uaps6HTT7Po8KU+UyxHarECh3QFWpz4f/R7/kiGG5kOwdumZH6RNkr9tL5hmTT+hPlMlfU4yq0ruNKSfenOv1K5OHt1rmOYtXvx1Eu+eIn1tYg9aXV71Wzw2ObolmT+z5UzAIVk24KJcgZ9ugM2V84fEwh4on0egBMKM69/wFRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=kMcu2v9y; arc=none smtp.client-ip=185.125.188.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from [192.168.192.85] (unknown [50.39.103.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 22E7E3F0F9; Tue, 21 May 2024 15:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1716306738; bh=kP6z+DgiQqeq0wyqIVgMsy730UPQ746toRzBhfDapGo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kMcu2v9yvdgcUxVHB1Kpdbwzw8q7gSGQfjE1PBDO4xt4g+Amp6IJnDkf9OWns7AQj HNQrMg0L4kD52GR7f6mDYiDJUh3AmW2nlHCbUcUiMWWu6rG+fpU38vFXgsyCMpWOLA kr+FcUvjO7mxCjuXNKBFJu4ZPZK+fpb0Veu8o5OcakBbuLGJCxxWz1vYbjMBUCizzn VPKOGxzwVcPExIsYKHwRZJb4I+XDEbOOSr9dKbzNNqKjZK7vCXs0IuBmh53MUC/W1e k5xvs+wSuOMD/X34oszUtV2iLN1PWvQQ+8mdqhJabPOErUFaCXr1AFBJCdFerQ1XdM vPv7FUMVAJTWA== Message-ID: <145e7c2c-4490-4066-9a80-bbaf04b70c16@canonical.com> Date: Tue, 21 May 2024 08:52:14 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] capabilities: user namespace capabilities To: "Eric W. Biederman" , Jonathan Calmels Cc: brauner@kernel.org, Luis Chamberlain , Kees Cook , Joel Granados , Serge Hallyn , Paul Moore , James Morris , David Howells , Jarkko Sakkinen , containers@lists.linux.dev, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org References: <20240516092213.6799-1-jcalmels@3xx0.net> <20240516092213.6799-2-jcalmels@3xx0.net> <878r08brmp.fsf@email.froward.int.ebiederm.org> <87jzjsa57k.fsf@email.froward.int.ebiederm.org> Content-Language: en-US From: John Johansen Autocrypt: addr=john.johansen@canonical.com; keydata= xsFNBE5mrPoBEADAk19PsgVgBKkImmR2isPQ6o7KJhTTKjJdwVbkWSnNn+o6Up5knKP1f49E BQlceWg1yp/NwbR8ad+eSEO/uma/K+PqWvBptKC9SWD97FG4uB4/caomLEU97sLQMtnvGWdx rxVRGM4anzWYMgzz5TZmIiVTZ43Ou5VpaS1Vz1ZSxP3h/xKNZr/TcW5WQai8u3PWVnbkjhSZ PHv1BghN69qxEPomrJBm1gmtx3ZiVmFXluwTmTgJOkpFol7nbJ0ilnYHrA7SX3CtR1upeUpM a/WIanVO96WdTjHHIa43fbhmQube4txS3FcQLOJVqQsx6lE9B7qAppm9hQ10qPWwdfPy/+0W 6AWtNu5ASiGVCInWzl2HBqYd/Zll93zUq+NIoCn8sDAM9iH+wtaGDcJywIGIn+edKNtK72AM gChTg/j1ZoWH6ZeWPjuUfubVzZto1FMoGJ/SF4MmdQG1iQNtf4sFZbEgXuy9cGi2bomF0zvy BJSANpxlKNBDYKzN6Kz09HUA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Oosciy98800mr/3nynvid0AKJ2VZIfOP46nboqlsWebA07SmyJSyeG8c XA87+8BuXdGxHn7RGj6G+zZwSZC6/2v9sOUJ+nOna3dwr6uHFSqKw7HwNl/PUGeRqgJEVu++ +T7sv9+iY+e0Y+SolyJgTxMYeRnDWE6S77g6gzYYHmcQOWP7ZMX+MtD4SKlf0+Q8li/F9GUL p0rw8op9f0p1+YAhyAd+dXWNKf7zIfZ2ME+0qKpbQnr1oizLHuJX/Telo8KMmHter28DPJ03 lT9Q Organization: Canonical In-Reply-To: <87jzjsa57k.fsf@email.froward.int.ebiederm.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/17/24 07:22, Eric W. Biederman wrote: > Jonathan Calmels writes: > >> On Fri, May 17, 2024 at 06:32:46AM GMT, Eric W. Biederman wrote: >>> >>> Pointers please? >>> >>> That sentence sounds about 5 years out of date. >> >> The link referenced is from last year. >> Here are some others often cited by distributions: >> >> https://nvd.nist.gov/vuln/detail/CVE-2022-0185 >> https://nvd.nist.gov/vuln/detail/CVE-2022-1015 >> https://nvd.nist.gov/vuln/detail/CVE-2022-2078 >> https://nvd.nist.gov/vuln/detail/CVE-2022-24122 >> https://nvd.nist.gov/vuln/detail/CVE-2022-25636 >> >> Recent thread discussing this too: >> https://seclists.org/oss-sec/2024/q2/128 > > My apologies perhaps I trimmed too much. > > I know that user namespaces enlarge the attack surface. > How much and how serious could be debated but for unprivileged > users the attack surface is undoubtedly enlarged. > > As I read your introduction you were justifying the introduction > of a new security mechanism with the observation that distributions > were carrying distribution specific patches. > > To the best of my knowledge distribution specific patches and > distributions disabling user namespaces have been gone for quite a > while. So if that has changed recently I would like to know. > almost all the distros are carrying the out of try sysctl to disable user namepsaces. Its disabled by default but is available. Ubuntu in its 24.04 release is now limiting unprivileged use of user namespaces to known code. At a generic code level they are allowed but with no capabilities within the user namespace.