Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp991390pxb; Wed, 29 Sep 2021 14:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRvENZ7ZxPlqBxtaMAyHocFwquxxlKzY44gZw+KG2IJY5ziRD/NemcwS9b/HAhaUq2MW9d X-Received: by 2002:a65:6ab0:: with SMTP id x16mr1755817pgu.181.1632950405566; Wed, 29 Sep 2021 14:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632950405; cv=none; d=google.com; s=arc-20160816; b=Dap434QCmm3t1iuio6kDI+oWl6Rk4kJzEg3Wmri1JvJ4KXxRYGSt1Lu8kMIvQ48YBP LBvfMEQPuLmKGBfY8IdnPjEeeuZCT4G6UOUl5GONBUdjmn3XIr7XyzpKnp9mdE3OFscO 0x1+scpaigj4G8eeHIJepXpNfaqVXVw90sqyL6x7DoAmsZB9mD0CZ0cilG2NhgR8S2e5 ZE3tVQA/FYU8RPFbRoBm3nmxVG8fT/KPmCu8ychJMG4UnKRb+W5JSg4+dcTl8g+cIGOr n3uhmIqKLy3xy2FC5/JxSnMxyTYOMJJ20E6iEwJYYfiPibiQQOO/GoPRaT2ubRoMffSp 1xKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9BZ9SSNsunYXKIbF+mdQMEB+a7jO8KRnYCiZ9joa8Kw=; b=NfbUYOqvxRW5rn9rstoFDgkKtwFrhV7DUXXU/7zb+vl0f+5OC6vA1woj4SO6mS8KRj AOn8LRlCt5qVNwOOhCkEQcjYGMGrMaWpJHOjW05CY2l5Qn2IiBYCBBTTb/GGoYXB1Ifb 9eq7SiU8LvMe40uM/EBED0oWUm9BAOdM3N7a29N0j/9BQpHapSTrHo+pjVHvJpxFM2cu N+a9cUBFa+3M/Hi2Rj2Tj5SN6FgIGtokDQtFOxa+mFQrsVwB2DO2C6AWTrYHPCo0U0Y+ RweYJnuxFyEHVkVcCJa7BymNMIr5Rwfu2XTK3jo741Nv2Ipx6ZSGkwCDgeY63KHQSa70 oyMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ByqA7vIU; 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 y34si1093385pgl.133.2021.09.29.14.19.32; Wed, 29 Sep 2021 14:20:05 -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=k20201202 header.b=ByqA7vIU; 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 S245179AbhI2TDT (ORCPT + 99 others); Wed, 29 Sep 2021 15:03:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:41968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345276AbhI2TDN (ORCPT ); Wed, 29 Sep 2021 15:03:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C94A961452; Wed, 29 Sep 2021 19:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632942092; bh=9BZ9SSNsunYXKIbF+mdQMEB+a7jO8KRnYCiZ9joa8Kw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ByqA7vIURnm2UsOZu2n0iL0xlzT0yi80z6jgMGuxYEqGCH0zXDvI6R1U0qBAfdIKf mvm55L8qEXRhYLRnAo/xnvZk88WT3ihqdM7wzWzxzmAUvVmF7XPWpdZdrVMCm7kz0v JNF1LiRbKiZztxduPw91K44Mg1QcybzLj87Dtw0T1a3L8LpUcdvtwi61dEaEpWLh0R mNFmWK+uPoDh4AV4G+3h3EbzPHPxPazjmxBT7uAUBxdxaIZ/QqnUsEJzN/P1kKwArp czJvKoCKbo0uSN92OmrSI74V/u89rF0mcDU0FXPXKWmCFvWNX3OYBp7Fmq6nwiANeJ TWlsJvmH339pA== Date: Wed, 29 Sep 2021 20:00:42 +0100 From: Mark Brown To: Kees Cook Cc: Josh Poimboeuf , Mark Rutland , Vito Caputo , Jann Horn , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Jens Axboe , Peter Zijlstra , Stefan Metzmacher , Andy Lutomirski , Lai Jiangshan , Christian Brauner , Andrew Morton , "Kenta.Tada@sony.com" , Daniel Bristot de Oliveira , Michael =?iso-8859-1?Q?Wei=DF?= , Anand K Mistry , Alexey Gladkov , Michal Hocko , Helge Deller , Dave Hansen , Andrea Righi , Ohhoon Kwon , Kalesh Singh , YiFei Zhu , "Eric W. Biederman" , Qi Zheng , linux-kernel@vger.kernel.org, x86@kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] proc: Disable /proc/$pid/wchan Message-ID: <20210929190042.GU4199@sirena.org.uk> References: <20210923234917.pqrxwoq7yqnvfpwu@shells.gnugeneration.com> <20210924002230.sijoedia65hf5bj7@shells.gnugeneration.com> <202109231814.FD09DBAD3@keescook> <20210924135424.GA33573@C02TD0UTHF1T.local> <202109240716.A0792BE46@keescook> <20210927090337.GB1131@C02TD0UTHF1T.local> <202109271103.4E15FC0@keescook> <20210927205056.jjdlkof5w6fs5wzw@treble> <202109291152.681444A135@keescook> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pzbqGaOtRNiVr7w4" Content-Disposition: inline In-Reply-To: <202109291152.681444A135@keescook> X-Cookie: 98% lean. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pzbqGaOtRNiVr7w4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 29, 2021 at 11:54:55AM -0700, Kees Cook wrote: > On Mon, Sep 27, 2021 at 01:50:56PM -0700, Josh Poimboeuf wrote: > > Even with that patch, it doesn't lock the task's runqueue before reading > > the stack, so there's still the possibility of the task running on > > another CPU and the unwinder going off the rails a bit, which might be > > used by an attacker in creative ways similar to the /proc//stack > > vulnerability Jann mentioned earlier. > Since I think we're considering get_wchan() to be slow-path, can we just > lock the runqueue and use arch_stack_walk_reliable()? Unfortunately arch_stack_walk_reliable() is only available for powerpc, s390 and x86 currently - work is in progress to implement it for arm64 as well but it's not there yet. --pzbqGaOtRNiVr7w4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmFUt9kACgkQJNaLcl1U h9BfJgf+O3xANtFrCZ5ZmvugZNPSBKmFmwXYza30TbY2cow+hwARTUCHPxRCDxq3 xHnib4kJ43GPqzw/CGZzdzYMv9JY6Uxk7o0v/4bemkoH5hywwVC0vefRVeFCsX9b Wq7NwpmwbKz9hL3fRnlWL5Y8MGWieuOo+QgK5eOe82h9Z9BjzxLTY2hIKk09AlQA NGouW/lSLQPyfN5SyD2LKETG1y2SlY3GwYEZIDSCScY/9JnlF40pgByIudz+Xi5O xIZUR6UpeCQAAFf6f6VgoUWVAdVgLKMq/wnBmajicvzj+p8QFi3krttH2H8ZwVX6 v2RVJaXwOmj/g/llVWW6WgZqgxcz2Q== =nUIA -----END PGP SIGNATURE----- --pzbqGaOtRNiVr7w4--