Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5286875imm; Tue, 9 Oct 2018 12:31:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV62LRSDRWp9JIRLhbCrra8jC5Rpwy4YS3dwWh/PZ/G1IxCSywwuykh9NZ0fUyoSc167ksBYG X-Received: by 2002:a17:902:3143:: with SMTP id w61-v6mr30258499plb.85.1539113506974; Tue, 09 Oct 2018 12:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539113506; cv=none; d=google.com; s=arc-20160816; b=RCPK/hgKGNnD/zJIDMPVRbv1M4//oCS8F2Imc+HGF0Kpfdqmv9PvCAuUFKwDDGONBs 3bFDf9vl8WRXs0MRQNsOOrvmWHoDqhXy/8A7Q/otZDQIOjYSXuaO4t3OGuyVkooZgjP3 H6JaBT6eIVaY/A0/44aQ8SYTaX/cRhv42DRFTa80zDGxQpfvhcSkfjDPdZPn2fi1kWH+ +GYWSW/GgYP5c1yI7lDOtfT+mDeoSUAaUZbBxOUde99sSgVYByJNfRM4Tj/mZP4CoVXR qPtZy233V/qfLPW/4bg17fO1LI6bPiZw+b03TAHEGch/TID0f7L1HWY8Wg8DoVljKzNQ T7wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+Xa3EUDrAkN6JNBlsa5oOb+C+ZG2cI791MkDRkVJybw=; b=F20YiZp9CJubQhk5zkzxQIrPxnvE9nGiIQANT0Ug3DGyGyA8aDJXs1ZWMoh0bPujKH lC9/pKoI5ZO2lpOptWTzCPLWTdC+0UABRMWfp7YYZZDXvKQOw9wHNt+FwBXGhYYWGjAm JS8Z2dLZpAF5LtZFfnyylRElsznuXUNyrCSTFns3OVZ5r4ktWN6EpN/xbc8/sb3GUmKW XzJiXtZltBadyxbPvYiGleprR5hCeD0SkSfQT74ptwp+apGzHRyy6Jg26CnhSrGS82LB 0q6qX3O7n6MILbnwJLwwdkWgkDrRfExzxA23Z0EW3yPSuAx0JWH2S7YHYE8WWx6qXxr7 dpuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r659rqmY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id j7-v6si19628033pgj.532.2018.10.09.12.31.31; Tue, 09 Oct 2018 12:31:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r659rqmY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727401AbeJJCoe (ORCPT + 99 others); Tue, 9 Oct 2018 22:44:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:50830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbeJJCoe (ORCPT ); Tue, 9 Oct 2018 22:44:34 -0400 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF23221479 for ; Tue, 9 Oct 2018 19:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539113166; bh=zwObxeASxgUn2wmwmnptCg2jXqGRpAdTlCkHTIHfk3E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=r659rqmY4MWyMInf4QGwx7+21u23GJkEtXzYNJH0WdajOn9r36l9F69GuSgS8Ruzm ecNkgz2lLRp44LcwuoYqF3tXL8v7XdM83Klo69M0A/YyPcdHMXY81CtYRHrhGsclsd +F2loglkJPeAifSGgDRqT2Xudx7AtAjzxMUjqgnw= Received: by mail-wm1-f52.google.com with SMTP id a8-v6so3203104wmf.1 for ; Tue, 09 Oct 2018 12:26:05 -0700 (PDT) X-Gm-Message-State: ABuFfojZjWcVH09yi28xR5Xuyh7K23DL+7CZFHWI+zmSLIzggKQxcIM/ 2bAbs7+2uuHJjpzdxpRfBjbvaxerAVq8EG+PkWNlMg== X-Received: by 2002:a1c:4054:: with SMTP id n81-v6mr3070990wma.82.1539113164148; Tue, 09 Oct 2018 12:26:04 -0700 (PDT) MIME-Version: 1.0 References: <20181009065300.11053-1-cyphar@cyphar.com> <20181009065300.11053-3-cyphar@cyphar.com> In-Reply-To: <20181009065300.11053-3-cyphar@cyphar.com> From: Andy Lutomirski Date: Tue, 9 Oct 2018 12:25:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] namei: implement O_BENEATH-style AT_* flags To: Aleksa Sarai Cc: Al Viro , "Eric W. Biederman" , Christian Brauner , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , Andrew Lutomirski , David Howells , Jann Horn , Tycho Andersen , David Drysdale , dev@opencontainers.org, Linux Containers , Linux FS Devel , LKML , linux-arch , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 8, 2018 at 11:53 PM Aleksa Sarai wrote: > * AT_NO_PROCLINK: Disallows ->get_link "symlink" jumping. This is a very > specific restriction, and it exists because /proc/$pid/fd/... > "symlinks" allow for access outside nd->root and pose risk to > container runtimes that don't want to be tricked into accessing a host > path (but do want to allow no-funny-business symlink resolution). Can you elaborate on the use case? If I'm set up a container namespace and walk it for real (through the outside /proc/PID/root or otherwise starting from an fd that points into that namespace), and I walk through that namespace's /proc, I'm going to see the same thing that the processes in the namespace would see. So what's the issue? Similarly, if I somehow manage to walk into the outside /proc, then I've pretty much lost regardless of the links. --Andy