From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: bpf <bpf@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next] bpf: initialize storage pointers to NULL to prevent freeing garbage pointer
Date: Mon, 9 Mar 2020 19:58:24 -0700 [thread overview]
Message-ID: <CAADnVQ+1tDeyMAS=XwvF58fCAUN0929QGE-NNj-i4m6jjLUw3g@mail.gmail.com> (raw)
In-Reply-To: <20200309222756.1018737-1-andriin@fb.com>
On Mon, Mar 9, 2020 at 3:28 PM Andrii Nakryiko <andriin@fb.com> wrote:
>
> Local storage array isn't initialized, so if cgroup storage allocation fails
> for BPF_CGROUP_STORAGE_SHARED, error handling code will attempt to free
> uninitialized pointer for BPF_CGROUP_STORAGE_PERCPI storage type. Avoid this
> by always initializing storage pointers to NULLs.
>
> Fixes: 8bad74f9840f ("bpf: extend cgroup bpf core to allow multiple cgroup storage types")
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Applied to bpf tree and fixed typo in commit log.
prev parent reply other threads:[~2020-03-10 2:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 22:27 [PATCH bpf-next] bpf: initialize storage pointers to NULL to prevent freeing garbage pointer Andrii Nakryiko
2020-03-10 2:58 ` 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='CAADnVQ+1tDeyMAS=XwvF58fCAUN0929QGE-NNj-i4m6jjLUw3g@mail.gmail.com' \
--to=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--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).