Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp754199pxa; Tue, 11 Aug 2020 14:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/1POl7qX5HfVgNLdD+bM6iHhuEvLjZwtW79rEzZsBjHiCXIxhHAWsbgKNwd8mO4M4aanO X-Received: by 2002:a17:906:d786:: with SMTP id pj6mr28730732ejb.261.1597180736916; Tue, 11 Aug 2020 14:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597180736; cv=none; d=google.com; s=arc-20160816; b=h1r7jBt+MIDLY9VzrNwnZaRXXeEIgLYj/7ZkAqTic7CpqS0JKG8ilTXtDcQhgou1pc JA7O+mD1MxVcMgroVcb1tfz4fbTJ6JVZQOE0c5vz7iactyKlzSn6/YhNC7qApMaMDCWI cR4uQXwX73aLhOaVLXQQSM9Zh9Zfds2yUVVRKna9VCoF9pLvGYuiO/CHqzjwI+aKfNke 1zOWZsUOT75aUEi0qDHdS5tQvet6W2dISEt1Vw8slb9l97Ze19SQWd/uJlTf+1qweB/l kdNNUJkDs/3ID+++en1SG/Ohn/JU8/mfKq32SjaiVZDBvR9yf76gJofgGaEkMLdoTK46 XoQg== 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=7thkAUDhxf9f6hbxhXn9qvBgDHyutRMdQQ8U8iYkV84=; b=trpxD2opoXVwj/RqgFFYCPGaiD9EfxY6S7D/V/NNVSc1G93sM8wxY9KwdSlM/36Ube 1iZ+z2HP4lNkW8KvkRw8fYUA4mqVDaMleyVMbERCY44tnK1l79ZLqHx3KBAjzeTK0mO3 ScBxylusPlVTFyaSklEULvlBaPFV9iknIUmhz/zfaBqauEH5+X4Yalye6lnliVSnAw2S 9Y/uetlT9bP0XRCYa2n7y4ZZ0DMkgrGGS6HEgTVxMRW8bHYRAWerzDrthh8BfiTUEM75 9nGNrFU1Bo3HnItBFD60oX8v2LiwUVq2wRAKGEMfx5xv7Y3fCAl70xPp0ZRDxNOyFwO9 /mvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tK2CUSAY; 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 p25si13981087ejy.419.2020.08.11.14.18.32; Tue, 11 Aug 2020 14:18:56 -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=default header.b=tK2CUSAY; 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 S1726355AbgHKVSC (ORCPT + 99 others); Tue, 11 Aug 2020 17:18:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:49416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbgHKVSB (ORCPT ); Tue, 11 Aug 2020 17:18:01 -0400 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 C1C72214F1 for ; Tue, 11 Aug 2020 21:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597180681; bh=H697I+zAaTrCDiFR/QxpngC4s+tbXs3+JE4nJBDzzfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tK2CUSAYGJsXC5JeDzxddiaRcH9cSe3p7Fz9EbTt74CjnD60QIkwqw4vvNHVT4ACh k8OJdYzfRcSknn79jqH5aZ7+zPt0lwvNeqsUB4IiILuEyl7X0VzGp5mhon5W5y90Os iDR/mF3JdxH+U4oF2F+FVjl0qmG7VCiROIuzIczU= Received: by mail-wm1-f51.google.com with SMTP id c19so2894606wmd.1 for ; Tue, 11 Aug 2020 14:18:00 -0700 (PDT) X-Gm-Message-State: AOAM530iEZh4+QNYmbUhQAq5kilKi6Z52Lm0rsnwYKHFzJU7gIhTNy2V 1QXWcegFJA4W4f/tynY1+pbn+ikmOZt3ekylqK2rjg== X-Received: by 2002:a1c:7e02:: with SMTP id z2mr5576013wmc.138.1597180679149; Tue, 11 Aug 2020 14:17:59 -0700 (PDT) MIME-Version: 1.0 References: <5C8E0FA8-274E-4B56-9B5A-88E768D01F3A@amacapital.net> In-Reply-To: From: Andy Lutomirski Date: Tue, 11 Aug 2020 14:17:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) To: Miklos Szeredi Cc: Jann Horn , Casey Schaufler , Linus Torvalds , linux-fsdevel , David Howells , Al Viro , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , Ian Kent , LSM , Linux Kernel Mailing List 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 Tue, Aug 11, 2020 at 1:56 PM Miklos Szeredi wrote: > > On Tue, Aug 11, 2020 at 10:37 PM Jann Horn wrote: > > If you change the semantics of path strings, you'd have to be > > confident that the new semantics fit nicely with all the path > > validation routines that exist scattered across userspace, and don't > > expose new interfaces through file server software and setuid binaries > > and so on. > > So that's where O_ALT comes in. If the application is consenting, > then that should prevent exploits. Or? We're going to be at risk from libraries that want to use the new O_ALT mechanism but are invoked by old code that passes traditional Linux paths. Each library will have to sanitize paths, and some will screw it up. I much prefer Linus' variant where the final part of the extended path is passed as a separate parameter.