mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Aleksandr Nogikh <nogikh@google.com>
Cc: syzbot <syzbot+1a01783ea233350598b5@syzkaller.appspotmail.com>,
	heikki.krogerus@linux.intel.com, jeffinphilip14@gmail.com,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	mika.westerberg@linux.intel.com, stable@vger.kernel.org,
	syzkaller-bugs@googlegroups.com,
	syzkaller <syzkaller@googlegroups.com>
Subject: Re: [syzbot] [usb?] general protection fault in wcove_typec_probe
Date: Wed, 26 Aug 2026 16:11:12 +0200	[thread overview]
Message-ID: <2026082602-compile-bogged-877d@gregkh> (raw)
In-Reply-To: <CANp29Y5hnOWaqGw8BbPu1TCr00TbvNRciYvs_VCd6Jtk=8kSPg@mail.gmail.com>

On Wed, Aug 26, 2026 at 03:26:23PM +0200, Aleksandr Nogikh wrote:
> On Tue, Aug 25, 2026 at 11:07 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Aug 25, 2026 at 11:04:54AM +0200, Aleksandr Nogikh wrote:
> > > Hi Greg,
> > >
> > > On Tue, Aug 25, 2026 at 7:12 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> < .. >
> > > >
> > > > Please do not think that this is a valid path for syzbot to be
> > > > fuzzing...
> > > >
> > >
> > > Can you please elaborate on this?
> > > Do you mean driver binding sysfs interface in general or something
> > > more specific?
> >
> > That is the specific thing, don't have syzbot do random bind/unbind
> > calls, having it attempt to bind any random driver to any random
> > hardware device.  That's not how bind/unbind is supposed to work at all,
> > it's for developers who "know what they are doing" and you get to keep
> > the broken system if you mess it up.
> >
> > Same for unbind.
> >
> > This is a root-only api for that reason.
> 
> Thanks for clarifying!
> 
> Some context from the syzkaller side:
> Restricting the fuzzer is always tricky, especially when the
> problematic operation is just opening a file and writing to it.
> 
> We normally constrain openat to:
> 1) An allowlist of safe absolute paths (so it won't open /dev/mem,
> etc.), blocking any other path starting with '/'.
> 2) Relative paths under CWD (so we can still fuzz normal file operations).
> 
> Here the problem is that one can mount sysfs under CWD, which leaves
> syzkaller full access to everything inside it.
> 
> Tightening the access to /bind, /unbind, /driver_override sounds
> reasonable, but trying to catch all workarounds purely in userspace
> (e.g., creating symlinks to these paths before opening them) will
> easily turn into a whack-a-mole.
> 
> Would you be open to adding some kernel config option or a boot
> parameter to disable manual sysfs driver bind/unbind and
> driver_override? We had a similar problem with writing to a block
> device while a filesystem was being mounted, which was perfectly
> solved by CONFIG_BLK_DEV_WRITE_MOUNTED.

I've submitted a patch to taint the kernel if these files are written
to, so that should "catch" syzbot and let you know to ignore these
reports if it runs into them:
	https://lore.kernel.org/r/20260826-bind_taint-v1-0-52b05f4a965c@linuxfoundation.org

Is that sufficient?

If not, no, I really don't want to make a kernel config option just for
this type of thing.

thanks,

greg k-h

  reply	other threads:[~2026-08-26 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  7:41 syzbot
2026-08-25  3:43 ` syzbot
2026-08-25  5:11   ` Greg KH
2026-08-25  5:20     ` Jeffin Philip
2026-08-25  9:04     ` Aleksandr Nogikh
2026-08-25  9:07       ` Greg KH
2026-08-26 13:26         ` Aleksandr Nogikh
2026-08-26 14:11           ` Greg KH [this message]
2026-08-26 14:32             ` Aleksandr Nogikh
2026-08-26 15:23               ` Greg KH
2026-08-27  9:08                 ` Aleksandr Nogikh

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=2026082602-compile-bogged-877d@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jeffinphilip14@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nogikh@google.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+1a01783ea233350598b5@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=syzkaller@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

all inboxes | Powered by JetHome®