Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4531515pxf; Tue, 30 Mar 2021 09:59:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPuAdZZauxdyFJCQWh8Cdiruwi21r7uyBcXkbDqPPDPS7xNfMYBHnF3uLAhMYxya2j4Fog X-Received: by 2002:a17:906:3ac3:: with SMTP id z3mr35095405ejd.106.1617123547674; Tue, 30 Mar 2021 09:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617123547; cv=none; d=google.com; s=arc-20160816; b=WHXCBwd3O3FFxIDXklNSQlb5Iw8ozDnr9yeR04dPXP0hvANLiGWkK/si4aVsVrOAjr GDgFoaNVZmdtkEMfTgAmp/aFSeHE+oWdi0tVyJGtlfl9dSOQqwTwD/RZf7KrFbtwZPKu 1LruL5fMK7lUpyKMuGCcB3V4YRGsu73crUpLfJ4SG9K5/zInF22dJXp8xvDrn+nR0lLk ilURQmas0ZqD77IXiHshgP0sKLhkhgb4D2GyRLoGvEJJpEsFNZ4+DZq6l03r9n5/zYQY mRCXC2CKQNgCJ8WgVYtqyfszQTYq1F0YB9cAFcr9U2hg0HYHY36qhm5VR/9edFlK2/+X gxbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j6aGDXVTNsyI5C+SBoIox6opb036yBkB/6u0GTIyOEM=; b=ENVv79e8Mvf55yQCBnpaQOdU+sAy8P21UTcoPCtmsr9p4IcFie1cZvrGeVpo1//7kC i7Ma/TnEiD4cjS1uRzFsrJSCJ0gT0HFvoiqrF6AFPJHA2jwakhbFv4EdMgxaP95QI7kU B3qsmTQeNX7f4yNHpLLr5YYLLobD/aId1p3sUF5wDaB/BFGkU6olyMHGzGONj+A5ZMv5 tvMTf5aUKoFPyNDmBxhLhcw0cbwly/cy6WJU5iIqZ5q4pG3duou2FynJ7BZFMEl9Py7+ im/WJpSej1raJ2EcnfumVyfrzHBzGMVfGwBDa/9Cdhg9vOWMBEEgj23WHI5zlxZLppjl Ltqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qZtcieMW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si15235333eji.719.2021.03.30.09.58.44; Tue, 30 Mar 2021 09:59:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qZtcieMW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232101AbhC3Q5I (ORCPT + 99 others); Tue, 30 Mar 2021 12:57:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:60130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232370AbhC3Q5A (ORCPT ); Tue, 30 Mar 2021 12:57:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 57559619A7; Tue, 30 Mar 2021 16:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617123420; bh=N9QsFO4gX80bBfmNggo0nfTWKB62BzJ6TQ6Z0yfhB6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qZtcieMWuPndfexXZk75CJrQJY2TqT0szlW/DnZD6q4MUpQ8NgPPfUZK5B47j4VeE DxOZypMg3k1lX1ADdW2amC3Ds915RstxMtnGj7QAUKtY9ikjJWqXmeky+HASNAKd4D 5F/KUbX3DR1rfDC3PNcCsvtBWaF29FjXb7dXfttBw+uVpfGY+3IkRF+oZDAK21OOxS fknwSGIfdUnd0wroqjQV43M+2w4niA3qlGr09YUa/1VmF5iVOEZ11s+mEC89/q+Div X+YuQyUPF5hc8IjZhk42Jw0EKax09nObBvh4yXWeyvp5rWKvlWwl7FE6jcQkAnwdlR tat1IKrvejIDQ== Date: Tue, 30 Mar 2021 12:56:59 -0400 From: Sasha Levin To: David Brazdil Cc: stable@vger.kernel.org, "David S . Miller" , Stefano Garzarella , Greg Kroah-Hartman , James Morris , Jorgen Hansen , Jeff Vander Stoep , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH pre-5.10] selinux: vsock: Set SID for socket returned by accept() Message-ID: References: <20210329182443.1960963-1-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210329182443.1960963-1-dbrazdil@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 06:24:43PM +0000, David Brazdil wrote: >[Backport of commit 1f935e8e72ec28dddb2dc0650b3b6626a293d94b to all >stable branches from 4.4 to 5.4, inclusive] > >For AF_VSOCK, accept() currently returns sockets that are unlabelled. >Other socket families derive the child's SID from the SID of the parent >and the SID of the incoming packet. This is typically done as the >connected socket is placed in the queue that accept() removes from. > >Reuse the existing 'security_sk_clone' hook to copy the SID from the >parent (server) socket to the child. There is no packet SID in this >case. Queued up, thanks! -- Thanks, Sasha