Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp778160imm; Tue, 5 Jun 2018 04:27:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLWSKDdge+5KRm4yuCwIvf6ch1BX+lap6t90S1jLFykxI6h6VTXQs9HwKzZ3m0YoMPOqDfo X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr26498027plg.393.1528198043825; Tue, 05 Jun 2018 04:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528198043; cv=none; d=google.com; s=arc-20160816; b=MozPmfi4onWWlq9eaYH4PdfCuhKlE8WrL4CLG1HmWpnx3QrHtWEmfyJ6uc/Icu9tTB 7eE1WEfOy4/M72odTUnRP5mGGKxWQ/hc3JpqJPDa2oS1ML/EIn36DHHB8aWXvAg8Rson YED9nyogkZh0LSrptipl+En8B5sSY+MlB9xGIilLgMRxe7ll7vGVe+rXTWYOJcgqYytM xrLVv8SomUz9BaI1t7V7IwAfwd2MUJDjKIEfNyVFr5te9APf7VOXQEAKJP0+dEcHR2xa ru4s5TiYcdEBnb3Yt6a7mA+19meDd7kMh4+nksOcTVlWDCycrlChmc0VHQi6HLLsak+G eI+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=MssVv/keEqHSQOROVlyHtEdqC+XpGK0SPmijxFM87kg=; b=jgZfEW7SCIyIBBFgAPXBw/UAkab79mB3tqEAMQXZEOBUqhb2b/oFGEuPBBgYD0BpZD GYCBCaxekSWzU3Usjfh860mLeXAaYaHW+0V2C+/bW+q5iU3q7GvzYOpcWx1JIZOz+YLe EvWR6d2z5rDyyoOEiWR9FsV+U1ytbZ6KfA5/MJQeBu0GuwxUSAyHXtzuJSQvOM2q62hO RALxbdaL+bWlsz1dTYjH34vU+5uFDhjJLGB6YtR+HQCZc1mBBqNpfEu1QYRqKbZrHLza qapBID253sxeeXtam/X+4kvUpH86PwHoJpNOGO/BLYRSTKqdTUwcOqIlthh0dPkb2fUe wWow== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16-v6si6321351pgt.477.2018.06.05.04.27.08; Tue, 05 Jun 2018 04:27:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbeFEL0o (ORCPT + 99 others); Tue, 5 Jun 2018 07:26:44 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:59858 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbeFEL0n (ORCPT ); Tue, 5 Jun 2018 07:26:43 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fQA6r-0004Ha-S7; Tue, 05 Jun 2018 11:26:41 +0000 Date: Tue, 5 Jun 2018 12:26:41 +0100 From: Al Viro To: Ilya Matveychikov Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] ksys_mount: check for permissions before resource allocation Message-ID: <20180605112641.GN30522@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 05, 2018 at 10:59:51AM +0400, Ilya Matveychikov wrote: > Just CC’ed to some of maintainers. > > $ perl scripts/get_maintainer.pl fs/0001-ksys_mount-check-for-permissions-before-resource-all.patch > Alexander Viro (maintainer:FILESYSTEMS (VFS and infrastructure)) > linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)) > linux-kernel@vger.kernel.org (open list) > > > On Jun 5, 2018, at 6:00 AM, Ilya Matveychikov wrote: > > > > Early check for mount permissions prevents possible allocation of 3 > > pages from kmalloc() pool by unpriveledged user which can be used for > > spraying the kernel heap. I'm sorry, but there are arseloads of unpriveleged syscalls that do the same, starting with read() from procfs files. So what the hell does it buy?