[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170629.153732.1036582619430791632.davem@davemloft.net>
Date: Thu, 29 Jun 2017 15:37:32 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: kafai@...com
Cc: netdev@...r.kernel.org, daniel@...earbox.net, ast@...com,
kernel-team@...com
Subject: Re: [PATCH net-next] bpf: Fix out-of-bound access on interpreters[]
From: Martin KaFai Lau <kafai@...com>
Date: Wed, 28 Jun 2017 10:41:24 -0700
> The index is off-by-one when fp->aux->stack_depth
> has already been rounded up to 32. In particular,
> if stack_depth is 512, the index will be 16.
>
> The fix is to round_up and then takes -1 instead of round_down.
...
> Fixes: b870aa901f4b ("bpf: use different interpreter depending on required stack size")
> Signed-off-by: Martin KaFai Lau <kafai@...com>
> Acked-by: Alexei Starovoitov <ast@...com>
> Acked-by: Daniel Borkmann <daniel@...earbox.net>
Applied, thanks Martin.
Powered by blists - more mailing lists