Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp85440lqd; Tue, 23 Apr 2024 15:53:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWk4n0vifYBHftvS2zrAl602YvNstXGZUieLWGK7+kXKr1xjyj+tcSHxN5DjR6YybukeDAVdY9LMpfqI3pB0QX37A28t0hZlGiE3jWSPg== X-Google-Smtp-Source: AGHT+IFTgQUsMGu0aqmogCO6EXHqk1y2HUwpFWEZuGuHoB5irRiZbUBVID+rXr1z01aVbmjWbXT7 X-Received: by 2002:a05:6a21:270f:b0:1a7:8dd9:5fd3 with SMTP id rm15-20020a056a21270f00b001a78dd95fd3mr4693285pzb.18.1713912788599; Tue, 23 Apr 2024 15:53:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713912788; cv=pass; d=google.com; s=arc-20160816; b=jKN0rvNCr0dUb9eFYB/epL+ksoAF54dV0UtiDzkoJzTKWNH0BKYsVosAChwuaLTzHD CuOkbZ5JT85ynirE3lTW+V97yWQ4KspxKNZ7pymsd/ndXklEtAwpZlsQvUqFvhQ2IIYw Nc62NBHoDeVsATsv7aFrr5JDfG5BdfyvhRNx7j3JY3lSgbpE4wYoJEHywHCWAieFF7S8 wWCbnvopOIVRjCjk/FhEEGVNk991FBWSjdVa4vQ+O7lalC8FQWStoiIgiRxcTzAwUyUu Ly4TEnDeQoALgKP8a0E8sQCh/JqfzMkFVaDpqYGEQGj6rLvtp9cd7MbxhG1OZqcbMgRt s38A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=frtj/OWfuK2l0yauuwxOq5Ja3FZYzGG8tIdmxFP5wxI=; fh=7XC3bGY2KXA4A6CyPdWHJvXwrjIY4o1kr734fjJP7lU=; b=zPAU0r/62sndLhtL8f3t3EJK8ueLV49278Gn36OK3Ar3GhgbVBhyXBQuy3DaLyLZmb 04sMzGObB7sdLZWF1AlHxUQf5spGpEq2AJMcHPHiziLI3xWQADEhM9dGfMj6DCf3rfcT HQEls22mzpy5wCE7iMdaQQnUaWlVebYT9LhiW/eKjNUhqBBc2yKqywiyHCbFIy9nsCUz 06BWbFVH0vglbQ3ED2JV68eijpzwcO7Dj0fYfGgk0V5XPqinfh8AhboBtUDleghFgN6H N4Wqa4aHCIRVGPPEpaZb3G7+aozFaUJYHNpBMoVt8UyWQ09kjYs3kSbnWKHIxA0o3Na5 /Elw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=rozgHBGe; arc=pass (i=1 spf=pass spfdomain=yandex.ru dkim=pass dkdomain=yandex.ru dmarc=pass fromdomain=yandex.ru); spf=pass (google.com: domain of linux-kernel+bounces-155980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q5-20020a63d605000000b005dc894ea130si10472043pgg.384.2024.04.23.15.53.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 15:53:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=rozgHBGe; arc=pass (i=1 spf=pass spfdomain=yandex.ru dkim=pass dkdomain=yandex.ru dmarc=pass fromdomain=yandex.ru); spf=pass (google.com: domain of linux-kernel+bounces-155980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru 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 305882826EB for ; Tue, 23 Apr 2024 22:53:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17A8936139; Tue, 23 Apr 2024 22:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b="rozgHBGe" Received: from forward501a.mail.yandex.net (forward501a.mail.yandex.net [178.154.239.81]) (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 CECFE18B04; Tue, 23 Apr 2024 22:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713912779; cv=none; b=uQtnQ2AjQMS/CxYSD2L0SK2BLcmLihoPQI4WywIoRIHmqfZVlj7NGxU3dFnPA4/amBLHiHsD40YseB7slskM1Zak2PfJHrdGpDZa3tZFhS82bI9BkKUOcQJtqov8QfhU4VljMhB4s3LzKY7+6n/fcilbD7hddH1BqUrYqNdAdGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713912779; c=relaxed/simple; bh=gEADGKBqJj3ZAJettCo9099wAMmz2xF0IxZ6PXZbvXM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZlzjFdfiXc57MWjYSxqyQDUgWzMQa+SAvNrPuC3QJG9HRPtbj9fh+hyK6t3V/i1+uebadvJm/XLNJinbiiFaE+WiO3B+evcETISGEFN9AkyCFdPfyjZW4gDNuaF26Nsfrj6l971R+D7zjea/yH/ouW+/5ViTSSbKmSxbyEO9yPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru; spf=pass smtp.mailfrom=yandex.ru; dkim=pass (1024-bit key) header.d=yandex.ru header.i=@yandex.ru header.b=rozgHBGe; arc=none smtp.client-ip=178.154.239.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yandex.ru Received: from mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:1a14:0:640:8120:0]) by forward501a.mail.yandex.net (Yandex) with ESMTPS id CC8D86180D; Wed, 24 Apr 2024 01:52:48 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id jqTm45NoKmI0-LxKvboFV; Wed, 24 Apr 2024 01:52:47 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1713912767; bh=frtj/OWfuK2l0yauuwxOq5Ja3FZYzGG8tIdmxFP5wxI=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=rozgHBGehcqd87/IxWKXLRd9g5vTbAA3lVsgEiB792xg6wC334pZBnp+3OjEKgz7b guU3natDtp2HyifDgFpl7coJBqwG9lbleKAaDfZjzr4fIE9rQ9OZ/pxI8S4DA3OaEz fo0ZnqwGYKldFBmH8cV96w6a6FI9GZYoMEchv2ks= Authentication-Results: mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <3a6eccbd-263d-4a54-a35f-c16f60dc0a11@yandex.ru> Date: Wed, 24 Apr 2024 01:52:45 +0300 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 v2 0/2] implement OA2_INHERIT_CRED flag for openat2() Content-Language: en-US To: Andy Lutomirski Cc: linux-kernel@vger.kernel.org, Stefan Metzmacher , Eric Biederman , Alexander Viro , Andy Lutomirski , Christian Brauner , Jan Kara , Jeff Layton , Chuck Lever , Alexander Aring , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, Paolo Bonzini , =?UTF-8?Q?Christian_G=C3=B6ttsche?= References: <20240423110148.13114-1-stsp2@yandex.ru> <4D2A1543-273F-417F-921B-E9F994FBF2E8@amacapital.net> From: stsp In-Reply-To: <4D2A1543-273F-417F-921B-E9F994FBF2E8@amacapital.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 23.04.2024 19:44, Andy Lutomirski пишет: > Also, there are lots of ways that f_cred could be relevant: fsuid/fsgid, effective capabilities and security labels. And it gets more complex if this ever gets extended to support connecting or sending to a socket or if someone opens a device node. Does CAP_SYS_ADMIN carry over? I posted a v3 where I only override fsuid, fsgid and group_info. Capabilities and whatever else are not overridden to avoid security risks. Does this address your concern? Note that I think your other concerns are already addressed, I just added a bit more of a description now.