From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH RFC v4 net-next 01/26] net: filter: add "load 64-bit immediate" eBPF instruction Date: Wed, 13 Aug 2014 14:27:36 -0700 Message-ID: <53EBD848.1060203@zytor.com> References: <1407916658-8731-1-git-send-email-ast@plumgrid.com> <1407916658-8731-2-git-send-email-ast@plumgrid.com> <53EBD6D5.3050706@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Andy Lutomirski Cc: Alexei Starovoitov , "David S. Miller" , Ingo Molnar , Linus Torvalds , Steven Rostedt , Daniel Borkmann , Chema Gonzalez , Eric Dumazet , Peter Zijlstra , Andrew Morton , Kees Cook , Linux API , Network Development , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-api@vger.kernel.org On 08/13/2014 02:23 PM, Andy Lutomirski wrote: > On Wed, Aug 13, 2014 at 2:21 PM, H. Peter Anvin wrote: >> One thing about this that may be a serious concern: allowing the user to >> control 8 contiguous bytes of kernel memory may be a security hazard. > > I'm confused. What kind of memory? I can control a lot more than 8 > bytes of stack very easily. > > Or are you concerned about 8 contiguous bytes of *executable* memory? > Yes. Useful for some kinds of ROP custom gadgets. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753966AbaHMV17 (ORCPT ); Wed, 13 Aug 2014 17:27:59 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58562 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752050AbaHMV15 (ORCPT ); Wed, 13 Aug 2014 17:27:57 -0400 Message-ID: <53EBD848.1060203@zytor.com> Date: Wed, 13 Aug 2014 14:27:36 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Andy Lutomirski CC: Alexei Starovoitov , "David S. Miller" , Ingo Molnar , Linus Torvalds , Steven Rostedt , Daniel Borkmann , Chema Gonzalez , Eric Dumazet , Peter Zijlstra , Andrew Morton , Kees Cook , Linux API , Network Development , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC v4 net-next 01/26] net: filter: add "load 64-bit immediate" eBPF instruction References: <1407916658-8731-1-git-send-email-ast@plumgrid.com> <1407916658-8731-2-git-send-email-ast@plumgrid.com> <53EBD6D5.3050706@zytor.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/13/2014 02:23 PM, Andy Lutomirski wrote: > On Wed, Aug 13, 2014 at 2:21 PM, H. Peter Anvin wrote: >> One thing about this that may be a serious concern: allowing the user to >> control 8 contiguous bytes of kernel memory may be a security hazard. > > I'm confused. What kind of memory? I can control a lot more than 8 > bytes of stack very easily. > > Or are you concerned about 8 contiguous bytes of *executable* memory? > Yes. Useful for some kinds of ROP custom gadgets. -hpa