From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8791C433E0 for ; Tue, 11 Aug 2020 21:18:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 858D320786 for ; Tue, 11 Aug 2020 21:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597180685; bh=H697I+zAaTrCDiFR/QxpngC4s+tbXs3+JE4nJBDzzfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=1P09SQOjUf4P0e/oNlaSx/7AYQobvXjP932l2sJqU/XE3P3J/fs86WnZmiwiPuCxl AlzGHthFeuhyv2xALZXVRz8ls+QEv0ROu9GWNImFTgUNi9MYvpNSUva0+UqQIkn913 xipl9Po8+EtODRIvKgGEAI7eqHC7ts5i3Fc5KClM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbgHKVSC (ORCPT ); Tue, 11 Aug 2020 17:18:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:49402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgHKVSB (ORCPT ); Tue, 11 Aug 2020 17:18:01 -0400 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 AB019207DE 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=1597180680; bh=H697I+zAaTrCDiFR/QxpngC4s+tbXs3+JE4nJBDzzfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IT1RF1YTWtDvefJCO9mfuCZ/I5IZnMecZ+md9PsXrV5wGW3duq6XWTgVUVnvpqY0I xxAWofUmDA6s9vdCg5tFImdWw/s3ChAXactoAxcXvaZbSU6botkJoRWeKHw2ZM7Kat LDs7Rs9M+2oWS1Tex0Vsa3HW5s+y05fGU4gw6IPc= Received: by mail-wm1-f54.google.com with SMTP id k8so36904wma.2 for ; Tue, 11 Aug 2020 14:18:00 -0700 (PDT) X-Gm-Message-State: AOAM532GTvFa+gHRboQE/b/TrhfeBPQhraove2Ou4tG/DTM2WANYHKyF JEaqWYxxX1QMCEpyZxf2HQjeASomYwEiKX3v68sKyA== X-Google-Smtp-Source: ABdhPJws+21t6FOJ6sK8kO00+QCrfmrTy0qT7N99L+sWIie61bUyPjWf7GBWU+7WzuyTe6ork3V+hpcBZbDKW738l/Y= 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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.