From: David Miller <davem@davemloft.net>
To: kafai@fb.com
Cc: netdev@vger.kernel.org, daniel@iogearbox.net, ast@fb.com,
kernel-team@fb.com
Subject: Re: [PATCH net-next] bpf: Fix out-of-bound access on interpreters[]
Date: Thu, 29 Jun 2017 15:37:32 -0400 (EDT) [thread overview]
Message-ID: <20170629.153732.1036582619430791632.davem@davemloft.net> (raw)
In-Reply-To: <20170628174124.1545332-1-kafai@fb.com>
From: Martin KaFai Lau <kafai@fb.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@fb.com>
> Acked-by: Alexei Starovoitov <ast@fb.com>
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Applied, thanks Martin.
prev parent reply other threads:[~2017-06-29 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 17:41 [PATCH net-next] bpf: Fix out-of-bound access on interpreters[] Martin KaFai Lau
2017-06-29 19:37 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170629.153732.1036582619430791632.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).