[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202109291224.8C538667@keescook>
Date: Wed, 29 Sep 2021 12:26:30 -0700
From: Kees Cook <keescook@...omium.org>
To: Mark Brown <broonie@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Vito Caputo <vcaputo@...garu.com>,
Jann Horn <jannh@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, Jens Axboe <axboe@...nel.dk>,
Peter Zijlstra <peterz@...radead.org>,
Stefan Metzmacher <metze@...ba.org>,
Andy Lutomirski <luto@...nel.org>,
Lai Jiangshan <laijs@...ux.alibaba.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kenta.Tada@...y.com" <Kenta.Tada@...y.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Michael Weiß
<michael.weiss@...ec.fraunhofer.de>,
Anand K Mistry <amistry@...gle.com>,
Alexey Gladkov <legion@...nel.org>,
Michal Hocko <mhocko@...e.com>, Helge Deller <deller@....de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andrea Righi <andrea.righi@...onical.com>,
Ohhoon Kwon <ohoono.kwon@...sung.com>,
Kalesh Singh <kaleshsingh@...gle.com>,
YiFei Zhu <yifeifz2@...inois.edu>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Qi Zheng <zhengqi.arch@...edance.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
linux-fsdevel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] proc: Disable /proc/$pid/wchan
On Wed, Sep 29, 2021 at 08:00:42PM +0100, Mark Brown wrote:
> 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/<pid>/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.
Strictly speaking, we're only trying to fix this for x86+ORC. The other
architectures (or non-ORC x86) already have their own non-ORC unwinders
behind get_wchan(). They may have similar weaknesses (which should
certainly be fixed), I think the first step here is to restore wchan
under x86+ORC.
--
Kees Cook
Powered by blists - more mailing lists