From: Daniel Borkmann Subject: Re: [PATCH bpf 5/9] bpf: restrict stack pointer arithmetic for unpriviledged Date: Tue, 1 Jan 2019 23:57:10 +0100 Message-ID: <09730d84-b462-318e-30ac-40bb9366d0f3@iogearbox.net> References: <20190101204925.4584-1-daniel@iogearbox.net> <20190101204925.4584-6-daniel@iogearbox.net> <20190101.132036.309861833852487033.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, jannh@google.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from www62.your-server.de ([213.133.104.62]:54456 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfAAW5R (ORCPT ); Tue, 1 Jan 2019 17:57:17 -0500 In-Reply-To: <20190101.132036.309861833852487033.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 01/01/2019 10:20 PM, David Miller wrote: > From: Daniel Borkmann > Date: Tue, 1 Jan 2019 21:49:21 +0100 > >> Restrict stack pointer arithmetic for unpriviledged users in that >> arithmetic itself must not go out of bounds as opposed to the actual >> access later on. Therefore after each adjust_ptr_min_max_vals() with >> a stack pointer as a destination we simulate a check_stack_access() >> of 1 byte on the destination and once that fails the program is >> rejected for unpriviledged program loads. This is analoge to map > ^^^^^^^ > > Should be "analog". Thanks for spotting, I'll fix the typos up in v2 shortly.