netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	guro@fb.com
Subject: Re: [PATCH net] bpf: uninitialized variables in test code
Date: Mon, 3 Dec 2018 13:34:06 +0300	[thread overview]
Message-ID: <20181203103406.GF3095@unbuntlaptop> (raw)
In-Reply-To: <20181130225801.7adzjdjkn5cirq4s@ast-mbp.dhcp.thefacebook.com>

I'm afraid Roman's patch doesn't fix the bug.

On Fri, Nov 30, 2018 at 02:58:03PM -0800, Alexei Starovoitov wrote:
> On Thu, Nov 29, 2018 at 01:27:03PM +0300, Dan Carpenter wrote:
> > Smatch complains that if bpf_test_run() fails with -ENOMEM at the
> > begining then the "duration" is uninitialized.  We then copy the
> > unintialized variables to the user inside the bpf_test_finish()
> > function.  The functions require CAP_SYS_ADMIN so it's not really an
> > information leak.
> > 
> > Fixes: 1cf1cae963c2 ("bpf: introduce BPF_PROG_TEST_RUN command")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> That is incorrect fixes tag.

Yeah.  You're right.  The Fixes tag is wrong.  I spent some time looking
at this too, because the code is old but the warning only just
appeared...  :/

Thanks for fixing this, Roman.

regards,
dan carpenter

      parent reply	other threads:[~2018-12-03 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 10:27 [PATCH net] bpf: uninitialized variables in test code Dan Carpenter
2018-11-30 22:54 ` Song Liu
2018-11-30 22:58 ` Alexei Starovoitov
2018-12-01 19:13   ` Roman Gushchin
2018-12-01 19:28     ` Alexei Starovoitov
2018-12-01 20:12       ` Roman Gushchin
2018-12-01 20:36         ` Alexei Starovoitov
2018-12-03 10:34   ` Dan Carpenter [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=20181203103406.GF3095@unbuntlaptop \
    --to=dan.carpenter@oracle.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=guro@fb.com \
    --cc=kernel-janitors@vger.kernel.org \
    --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).