bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	Andrey Ignatov <rdna@fb.com>
Cc: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf] libbpf: fix SIGSEGV when BTF loading fails, but .BTF.ext exists
Date: Fri, 19 Jul 2019 19:38:33 +0000	[thread overview]
Message-ID: <119053c1-5f18-3161-47c2-e39c2783d0d6@fb.com> (raw)
In-Reply-To: <20190719193242.2658962-1-andriin@fb.com>

On 7/19/19 12:32 PM, Andrii Nakryiko wrote:
> In case when BTF loading fails despite sanitization, but BPF object has
> .BTF.ext loaded as well, we free and null obj->btf, but not
> obj->btf_ext. This leads to an attempt to relocate .BTF.ext later on
> during bpf_object__load(), which assumes obj->btf is present. This leads
> to SIGSEGV on null pointer access. Fix bug by freeing and nulling
> obj->btf_ext as well.
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Applied. Thanks

      reply	other threads:[~2019-07-19 19:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 19:32 [PATCH bpf] libbpf: fix SIGSEGV when BTF loading fails, but .BTF.ext exists Andrii Nakryiko
2019-07-19 19:38 ` Alexei Starovoitov [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=119053c1-5f18-3161-47c2-e39c2783d0d6@fb.com \
    --to=ast@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=rdna@fb.com \
    /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).