Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp523476pxu; Wed, 14 Oct 2020 07:17:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwREcDagjUcSBIyuLZfVksPf6ZdcJYUUGj+yevwLijjHwHOySVY5i+VGXQLk9RoDAm2NwJO X-Received: by 2002:a17:906:1b15:: with SMTP id o21mr5573524ejg.19.1602685070095; Wed, 14 Oct 2020 07:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602685070; cv=none; d=google.com; s=arc-20160816; b=IZlLUSqqwAOw5xeaWg6p65akSYitg/8s2W8eHKAuvjUDzFYAnJVdHZOpvxfe6aB3tQ IJDXR8yEmTalpzG9II209HtuGDpSnz51WcTpIlBTD9uxtEb1HuVWh4w+y0gb0KwXobdK a9Lmhf/jPXLPvscvPpV1qDnO6T2ZlM1RUGbT6Q+139A7OLscl7Da7msoovHxGAnXR/LY Xf1FV3TAyhK1F4fIBWaHPUU2DddiX/syV5G7Mk0M/uqVq6mjv9yub6z1YmNiu40BbMak Mpnjj2zQAncPxx/DnfuRSFFKIkXGXMtXDgKMRIiC09zCNAyvSfve9B9oY6tEvBWcm2Fb sndA== 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=Zj/mSELh0gkQiJzxNFapB7VTFgX/SPaMVeSie4q6aLI=; b=efL5Nwmqfk+DigOCzUwbvP7bJ3iAzs1TuYpuPBq54U3u35t1LONTZ3gfikQERJnAYl bCthEhKxopN6csqW3YrIkTM71+FAELvIhejRaC8IfZRKRm/czxxPtgWRkfMTfipTP9nv mN4KuCAILdimUhmYSat5riOHqbantNgZ9q94/hUgoc62VEh3FgDkxF1yPOS/oACUzFyx lBUJ6lF7/lYsRji3oNA3mtnfc7NHdDiN+4ZY9/X3JdVwantXSM+ABwr4tJ7Tt4NmtiLh 3y4jC1A9UCnaVwccoeJDGFCYSjl735ZvCH7l086q6mfGWVErc1+DVhRXTIDxJ399iQKV ByAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OMo7hmfN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si2363253edm.359.2020.10.14.07.17.24; Wed, 14 Oct 2020 07:17:50 -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=@infradead.org header.s=casper.20170209 header.b=OMo7hmfN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728983AbgJNITf (ORCPT + 99 others); Wed, 14 Oct 2020 04:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727767AbgJNITd (ORCPT ); Wed, 14 Oct 2020 04:19:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E88B9C04586A; Tue, 13 Oct 2020 22:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Zj/mSELh0gkQiJzxNFapB7VTFgX/SPaMVeSie4q6aLI=; b=OMo7hmfNufPo6rVhRGuQHzLQ0b 1VAPwm7au3dwZhP2U8KCBzhdLGuGCJg4Y6BujKWfQq2J1qHSQizXWY3eydQmN9Z/I4vBdS6zYKs5j 8G4vo2y4z0B+BuZzAKnFd/zlkgAkwf4/KGUd29HlOFzuWZb9K09Z7harllEIKARBJ+lNl3gcIyJwx IgDSWugwC2Wi8bsLi3iEMqOtFQSkJCi/2zicQQg/+6U0CE8rkkSKMimmb2xrSDPfAVVBj7aqg8wnj QMZqWCmfY9u5oHJiUeflNjGtB6dSKh1s54zSdXMn8V4HVtnycq0plQXp5B1021lCYA4/A3ZxNhsFb Ml0gOVXw==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSZgx-0005RW-Py; Wed, 14 Oct 2020 05:51:15 +0000 Date: Wed, 14 Oct 2020 06:51:15 +0100 From: Christoph Hellwig To: Alexander Viro Cc: Linus Torvalds , Eric Biggers , Al Viro , Christoph Hellwig , Michael Ellerman , the arch/x86 maintainers , Alexey Dobriyan , Luis Chamberlain , Kees Cook , Linux Kernel Mailing List , linux-fsdevel , linux-arch , linuxppc-dev Subject: Re: [PATCH 05/14] fs: don't allow kernel reads and writes without iter ops Message-ID: <20201014055115.GA19844@infradead.org> References: <20200903142242.925828-1-hch@lst.de> <20200903142242.925828-6-hch@lst.de> <20201001223852.GA855@sol.localdomain> <20201001224051.GI3421308@ZenIV.linux.org.uk> <20201009220633.GA1122@sol.localdomain> <20201010011919.GC1122@sol.localdomain> <20201010015524.GB101464@shell-el7.hosts.prod.upshift.rdu2.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201010015524.GB101464@shell-el7.hosts.prod.upshift.rdu2.redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 10, 2020 at 01:55:24AM +0000, Alexander Viro wrote: > FWIW, I hadn't pushed that branch out (or merged it into #for-next yet); > for one thing, uml part (mconsole) is simply broken, for another... > IMO ##5--8 are asking for kernel_pread() and if you look at binfmt_elf.c, > you'll see elf_read() being pretty much that. acct.c, keys and usermode > parts are asking for kernel_pwrite() as well. > > I've got stuck looking through the drivers/target stuff - it would've > been another kernel_pwrite() candidate, but it smells like its use of > filp_open() is really asking for trouble, starting with symlink attacks. > Not sure - I'm not familiar with the area, but... Can you just pull in the minimal fix so that the branch gets fixed for this merge window? All the cleanups can come later.