Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754641Ab3ETG4S (ORCPT ); Mon, 20 May 2013 02:56:18 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:54314 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476Ab3ETG4Q (ORCPT ); Mon, 20 May 2013 02:56:16 -0400 Date: Sun, 19 May 2013 23:56:15 -0700 (PDT) Message-Id: <20130519.235615.1794473948693729339.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: netdev@vger.kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] x86: bpf_jit_comp: secure bpf jit against spraying attacks From: David Miller In-Reply-To: <1368844623.3301.142.camel@edumazet-glaptop> References: <1368844623.3301.142.camel@edumazet-glaptop> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (shards.monkeyblade.net [0.0.0.0]); Sun, 19 May 2013 23:56:16 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 984 Lines: 27 From: Eric Dumazet Date: Fri, 17 May 2013 19:37:03 -0700 > From: Eric Dumazet > > hpa bringed into my attention some security related issues > with BPF JIT on x86. > > This patch makes sure the bpf generated code is marked read only, > as other kernel text sections. > > It also splits the unused space (we vmalloc() and only use a fraction of > the page) in two parts, so that the generated bpf code not starts at a > known offset in the page, but a pseudo random one. > > Refs: > http://mainisusuallyafunction.blogspot.com/2012/11/attacking-hardened-linux-systems-with.html > > Reported-by: H. Peter Anvin > Signed-off-by: Eric Dumazet Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/