From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall Date: Wed, 22 Mar 2017 13:44:57 -0700 Message-ID: References: <20170322203834.67556-1-thgarnie@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20170322203834.67556-1-thgarnie-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thomas Garnier Cc: Martin Schwidefsky , Heiko Carstens , Dave Hansen , David Howells , Al Viro , Arnd Bergmann , =?UTF-8?Q?Ren=C3=A9_Nyffenegger?= , Andrew Morton , "Paul E . McKenney" , Ingo Molnar , Thomas Gleixner , Oleg Nesterov , Pavel Tikhomirov , Stephen Smalley , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Paolo Bonzini , Rik van Riel , Kees List-Id: linux-api@vger.kernel.org On Wed, Mar 22, 2017 at 1:38 PM, Thomas Garnier wrote: > This patch ensures a syscall does not return to user-mode with a kernel > address limit. If that happened, a process can corrupt kernel-mode > memory and elevate privileges. > > For example, it would mitigation this bug: > > - https://bugs.chromium.org/p/project-zero/issues/detail?id=990 > > If the CONFIG_BUG_ON_DATA_CORRUPTION option is enabled, an incorrect > state will result in a BUG_ON. I'm a bit confused about this choice of configurability. I can see two sensible choices: 1. Enable this hardening feature: BUG if there's an exploitable bug. 2. Don't enable it at all. While it's possible that silently papering over the bug is slightly faster than BUGging, it will allow bugs to continue to exist undetected. --Andy