Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1380301lqd; Thu, 25 Apr 2024 13:52:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVb04bUBmaIOX8EedwhOyHaXWKICnOUm1n3xVHZFCjTEFljd0zmETJWhtZaCHmLzd5rAGvxoVzYihHZX1dYzG/jGHmi25z1jwGPbL1z7w== X-Google-Smtp-Source: AGHT+IGzC0hUhqbI7GROBKcE96stv8eIG4KhZx5kOqJW8hRGhrzeSXqaC69l+mwGptGSkmGPkKJU X-Received: by 2002:adf:f80d:0:b0:346:cd6f:3fd9 with SMTP id s13-20020adff80d000000b00346cd6f3fd9mr431176wrp.10.1714078332582; Thu, 25 Apr 2024 13:52:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714078332; cv=pass; d=google.com; s=arc-20160816; b=uOvU7Guqpnz7eeGZ7UWSl8ssFO96t8iE/TrmZpyjvh4yDnXJcl3jvA90s46DZSfoJN lPiPWog/3Oh9Sa4cqYD7vFa7MHQ1+ZPu+c1qtNmaA7fXr4TMpv5XDXmwfzeeo9sbfRz5 9gWOTM15yzNBAIGswwQtt5ZLi25bCdESzLSrvNv1MoClMrapm1mM2g0DsSBxxMp+3mYo m4M63/gNffkrhQxWMyJ0/QwizcTMEU9FPdpYs78rhyqw+pWjPetnp2me85/Zxa4GaufS Oc7dBk3KpqZ8/ri99mCTPOjuVhjIY0xKTpi2thaES5UVu1luc13mSQq7OGeCuuisv4wM 7kdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hJnGKlFsEdNJjEDM4XvaGQLENUcY5zQAR7r5FdpupwQ=; fh=6EDMaiWF4L/xWnwMyXtYVAQEmxD0dJv4kMwrD5Y0dsc=; b=JoQg65wlqmUE5Jjjkra9pwely5TU7hvSJkqlbDif3LrKixQKiucuxcfLWNn/ouV4V5 Oms/61PdaooHoF8c4X1IURG/D9K3fEt566sqS0c4zO6166eLlqSiq3s92H3nxaRK2SPX OLGkHSs5mKVWg2Kn1d1IWqWU71NbVss9Wr0BjvMI8n9TCKf8ntatXHPFJcUdowyyRz+8 c22aFvX9UsukCeUmdWB46qOC9sZAsErDT53qOn4orbPqxi3ffTcwMrcBqoUvmbBAYgbP HRARARHj3u+03572DP94Ij+6q/Sk0yhKz+6kMvcIoyoPELR0f8tYH7oaTyJ6XlDczQvx 1f5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bo9q4Ldl; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-159165-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159165-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gu4-20020a170906f28400b00a5196a0156dsi9906813ejb.50.2024.04.25.13.52.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 13:52:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159165-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=bo9q4Ldl; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-159165-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159165-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E4FD51F20D3E for ; Thu, 25 Apr 2024 20:52:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1138153BD0; Thu, 25 Apr 2024 20:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bo9q4Ldl" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DBB712BF28; Thu, 25 Apr 2024 20:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714078323; cv=none; b=sDhmg744UlSTuTIDH9cm1ssHJR4I4VswgIvVtgXXP0iJVjiM0SRu7UQ3D04P6lOW6NUAQG4rz8DNd0i4U2pRxb6hwyoI4sAJZiy3BPsHjjGInuTdo7Ng2DwgxKhE9eMHoJbEqW9vVbJdxfobg9W2uc+A/Fa0p+ybVfotQyp5q8M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714078323; c=relaxed/simple; bh=cFdB9HVYh7TvLB545AwLixKDtms5Knk/w+nGJNJ4lC8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e3rG4c/b2M49zwsJlV0myuE7CdPkVOGVn6XgWHPXFDwjWL/rYFY3pCz4Qo/KhKG9vUGTVQM5SX7Owl+wYsASs4hXT/WWOA1GDBYUjkB0RgOzzSKF3YaBt6AH1UJmnTovmMxZXIhBXeu603m2+Lp7i71aPbLhKjkCsRvzDIl5ntk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=bo9q4Ldl; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=hJnGKlFsEdNJjEDM4XvaGQLENUcY5zQAR7r5FdpupwQ=; b=bo9q4LdlCZLTTK/4zwHgn4i/vy 9RXgMPtRYqp2esiVVhqS/MCI4NYp7dVSgNn+uDvu6h5imZjgBh7pv9k2U0GpJu9pH7rh960TsMToE gNwAye2hN90NsgGPxN/p9AiiVjtZMZ0h3hhpbDQ8CR9TRtKQMj+3+pQTe5BNgqPgvTr19LyRNr9i7 JFVymDZ/7tEk9V5ErQGkkUjjdIFTC7zFgiC4IKqy6FPu9BaIBnEkxYt3bZDKqQ8k33qj8l0fU8mEi JDQ9hOMTmNHG5QY5brxdSzvQQWbdYMwh5StdPAiOGLBx0gNFDO7Ont9NVBcjAqZJ8f2rmoeTGrZ67 7JIJSbgA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s064S-00000003mfl-3Cuq; Thu, 25 Apr 2024 20:51:56 +0000 Date: Thu, 25 Apr 2024 21:51:56 +0100 From: Matthew Wilcox To: Kent Overstreet Cc: Kees Cook , Suren Baghdasaryan , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] alloc_tag: Tighten file permissions on /proc/allocinfo Message-ID: References: <20240425200844.work.184-kees@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Apr 25, 2024 at 04:45:51PM -0400, Kent Overstreet wrote: > On Thu, Apr 25, 2024 at 01:08:50PM -0700, Kees Cook wrote: > > The /proc/allocinfo file exposes a tremendous about of information about > > kernel build details, memory allocations (obviously), and potentially > > even image layout (due to ordering). As this is intended to be consumed > > by system owners (like /proc/slabinfo), use the same file permissions as > > there: 0400. > > Err... > > The side effect of locking down more and more reporting interfaces is > that programs that consume those interfaces now have to run as root. sudo cat /proc/allocinfo | analyse-that-fie