public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: gregkh@linuxfoundation.org, ast@kernel.org,
	stable@vger.kernel.org, Edward Cree <ecree@solarflare.com>
Subject: Re: [PATCH stable 4.18/4.19] bpf: fix partial copy of map_ptr when dst is scalar
Date: Mon, 5 Nov 2018 19:37:28 -0500	[thread overview]
Message-ID: <20181106003728.GA194472@sasha-vm> (raw)
In-Reply-To: <1ab319ff13f6d6a3411ada64c5e2e2d4ac0988d9.1541107505.git.daniel@iogearbox.net>

On Thu, Nov 01, 2018 at 10:29:53PM +0100, Daniel Borkmann wrote:
>commit 0962590e553331db2cc0aef2dc35c57f6300dbbe upstream.
>
>ALU operations on pointers such as scalar_reg += map_value_ptr are
>handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr
>and range in the register state share a union, so transferring state
>through dst_reg->range = ptr_reg->range is just buggy as any new
>map_ptr in the dst_reg is then truncated (or null) for subsequent
>checks. Fix this by adding a raw member and use it for copying state
>over to dst_reg.
>
>Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
>Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
>Cc: Edward Cree <ecree@solarflare.com>
>Acked-by: Alexei Starovoitov <ast@kernel.org>
>Signed-off-by: Alexei Starovoitov <ast@kernel.org>
>Acked-by: Edward Cree <ecree@solarflare.com>
>---

Queued this and the other patch to their respective trees, thank you!

--
Thanks,
Sasha

      reply	other threads:[~2018-11-06 10:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01 21:29 [PATCH stable 4.18/4.19] bpf: fix partial copy of map_ptr when dst is scalar Daniel Borkmann
2018-11-06  0:37 ` Sasha Levin [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=20181106003728.GA194472@sasha-vm \
    --to=sashal@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ecree@solarflare.com \
    --cc=gregkh@linuxfoundation.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