From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754567AbbI3IIz (ORCPT ); Wed, 30 Sep 2015 04:08:55 -0400 Received: from www.linutronix.de ([62.245.132.108]:58342 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbbI3IIt (ORCPT ); Wed, 30 Sep 2015 04:08:49 -0400 Date: Wed, 30 Sep 2015 10:07:58 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: Dmitry Vyukov , Andrey Ryabinin , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , "x86@kernel.org" , LKML , Kostya Serebryany , Alexander Potapenko , Andrey Konovalov , Sasha Levin , Andi Kleen , kasan-dev Subject: Re: [PATCH] arch/x86: fix out-of-bounds in get_wchan() In-Reply-To: Message-ID: References: <1443430839-13225-1-git-send-email-dvyukov@google.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Sep 2015, Andy Lutomirski wrote: > I'm be vaguely amazed if this isn't an exploitable info leak even > without the out of bounds thing. The info leak happens in fs/proc, where we happily print arbitrary "IP" values, if we cant resolve a symbol. > Can we really not find a way to do this without walking the stack? We would have to add a 'store wait channel' mechanism to all functions which are the primary entry points to scheduling. Not impossible, but not pretty either. If we want to prevent the stack changing under us, we'd need to take p->pi_lock and do the task != RUNNING check and the walk under it. I don't think we want to do that, unless there is a compelling reason to do so. Thanks, tglx