From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, netdev@vger.kernel.org,
Edward Cree <ecree@solarflare.com>, Jann Horn <jannh@google.com>,
Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH 4.9] bpf/verifier: Fix states_equal() comparison of pointer and UNKNOWN
Date: Fri, 22 Dec 2017 19:51:42 -0800 [thread overview]
Message-ID: <20171223035140.mcv34grauxixvxsi@ast-mbp> (raw)
In-Reply-To: <20171223022617.GO2971@decadent.org.uk>
On Sat, Dec 23, 2017 at 02:26:17AM +0000, Ben Hutchings wrote:
> An UNKNOWN_VALUE is not supposed to be derived from a pointer, unless
> pointer leaks are allowed. Therefore, states_equal() must not treat
> a state with a pointer in a register as "equal" to a state with an
> UNKNOWN_VALUE in that register.
>
> This was fixed differently upstream, but the code around here was
> largely rewritten in 4.14 by commit f1174f77b50c "bpf/verifier: rework
> value tracking". The bug can be detected by the bpf/verifier sub-test
> "pointer/scalar confusion in state equality check (way 1)".
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Cc: Edward Cree <ecree@solarflare.com>
> Cc: Jann Horn <jannh@google.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
next prev parent reply other threads:[~2017-12-23 3:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-23 2:26 [PATCH 4.9] bpf/verifier: Fix states_equal() comparison of pointer and UNKNOWN Ben Hutchings
2017-12-23 3:51 ` Alexei Starovoitov [this message]
2017-12-23 4:31 ` kasan for bpf Alexei Starovoitov
2017-12-23 16:03 ` David Miller
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=20171223035140.mcv34grauxixvxsi@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=ast@kernel.org \
--cc=ben@decadent.org.uk \
--cc=ecree@solarflare.com \
--cc=gregkh@linuxfoundation.org \
--cc=jannh@google.com \
--cc=netdev@vger.kernel.org \
--cc=stable@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