linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 syzbot <syzbot+79102ed905e5b2dc0fc3@syzkaller.appspotmail.com>,
	 LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	 syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	bpf <bpf@vger.kernel.org>
Subject: Re: [syzbot] [mm?] KMSAN: kernel-infoleak in bpf_probe_write_user
Date: Tue, 16 Apr 2024 08:16:01 -0700	[thread overview]
Message-ID: <CAADnVQLUXVV_viC7mmm6VaAyveQKMzibdCMpnUQdf_-3FdjM7Q@mail.gmail.com> (raw)
In-Reply-To: <CAG_fn=Uxaq1juuq-3cA1qQu6gB7ZB=LpyxBEdKf7DpYfAo3zmg@mail.gmail.com>

On Tue, Apr 16, 2024 at 1:52 AM Alexander Potapenko <glider@google.com> wrote:
>
> On Mon, Apr 15, 2024 at 11:06 PM Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
> >
> > Hi,
> >
> > syzbot folks, please disable such "bug" reporting.
> > The whole point of bpf is to pass such info to userspace.
> > probe_write_user, various ring buffers, bpf_*_printk-s, bpf maps
> > all serve this purpose of "infoleak".
> >
>
> Hi Alexei,
>
> From KMSAN's perspective it is fine to pass information to the
> userspace, unless it is marked as uninitialized.
> It could be that we are missing some initialization in kernel/bpf/core.c though.
> Do you know which part of the code is supposed to initialize the stack
> in PROG_NAME?

cap_bpf + cap_perfmon bpf program are allowed to read uninitialized stack.

And recently we added
commit e8742081db7d ("bpf: Mark bpf prog stack with
kmsan_unposion_memory in interpreter mode")
to shut up syzbot.


  reply	other threads:[~2024-04-16 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-13  2:27 [syzbot] [mm?] KMSAN: kernel-infoleak in bpf_probe_write_user syzbot
2024-04-15 20:18 ` Andrew Morton
2024-04-15 21:06   ` Alexei Starovoitov
2024-04-16  8:46     ` Aleksandr Nogikh
2024-04-16  8:52     ` Alexander Potapenko
2024-04-16 15:16       ` Alexei Starovoitov [this message]
2024-04-18  7:58         ` Alexander Potapenko

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=CAADnVQLUXVV_viC7mmm6VaAyveQKMzibdCMpnUQdf_-3FdjM7Q@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bpf@vger.kernel.org \
    --cc=glider@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+79102ed905e5b2dc0fc3@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).