From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932894AbdELTJC (ORCPT ); Fri, 12 May 2017 15:09:02 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:35253 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932428AbdELTI7 (ORCPT ); Fri, 12 May 2017 15:08:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170428153213.137279-1-thgarnie@google.com> <20170508073352.caqe3fqf7nuxypgi@gmail.com> <20170508075209.7aluvpwildw325rf@gmail.com> <1494256932.1167.1.camel@gmail.com> <20170509065619.wmqa6z6w3n6xpvrw@gmail.com> <20170509111007.GA14702@kroah.com> <20170512072802.5a686f23@mschwideX1> <20170512075458.09a3a1ce@mschwideX1> From: Linus Torvalds Date: Fri, 12 May 2017 12:08:57 -0700 X-Google-Sender-Auth: 6wG2r2Kpas6BLWuOmB18i2Ez_Ts Message-ID: Subject: Re: [kernel-hardening] Re: [PATCH v9 1/4] syscalls: Verify address limit before returning to user-mode To: Kees Cook Cc: Martin Schwidefsky , Thomas Garnier , Greg KH , Ingo Molnar , Daniel Micay , Heiko Carstens , Dave Hansen , Arnd Bergmann , Thomas Gleixner , David Howells , =?UTF-8?Q?Ren=C3=A9_Nyffenegger?= , Andrew Morton , "Paul E . McKenney" , "Eric W . Biederman" , Oleg Nesterov , Pavel Tikhomirov , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Paolo Bonzini , Rik van Riel , Josh Poimboeuf , Borislav Petkov , Brian Gerst , "Kirill A . Shutemov" , Christian Borntraeger , Russell King , Will Deacon , Catalin Marinas , Mark Rutland , James Morse , linux-s390 , LKML , Linux API , "the arch/x86 maintainers" , "linux-arm-kernel@lists.infradead.org" , Kernel Hardening , Peter Zijlstra , Al Viro Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 12, 2017 at 12:01 PM, Kees Cook wrote: > > Yeah, the risk for "corrupted addr_limit" is mainly a concern for > archs with addr_limit on the kernel stack. If I'm reading things > correctly, that means, from the archs I've been paying closer > attention to, it's an issue for arm, mips, and powerpc: I don't understand why people are looking at addr_limit as some kind of special thing. If somebody is smashing the stack and corrupting thread info data, the game is over. addr_limit is the *least* of your problems, and it's not even all that likely that it will be increasing (it's much more likely that it would be overwritten with a smaller value). Quite frankly, this kind of idiotic discussion just makes me question the whole idea of the patch. Any "security" that is this specific is not real security, it's just masturbatory garbage. It may be worth checking that people use "set_fs()" properly. But stop this idiotic crap. It just makes the kernel security people look like the crazies. There are enough incompetent crazy security people, don't go there. The kinds of things it is worth protecting against are the big class of generic issues, not the kind of "oh, but imagine if a cosmic ray flips this particular word in memory" kind of crap that ignores all the other words of memory. Seriously, Kees. You are just making security people look bad. Stop it. Linus