Linux USB
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: heikki.krogerus@linux.intel.com, pooja.katiyar@intel.com,
	johan@kernel.org, pmenzel@molgen.mpg.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+23cf45a9fce78e4e0dc1@syzkaller.appspotmail.com
Subject: Re: [PATCH] usb: typec: ucsi_acpi: fix NULL pointer dereference in ucsi_acpi_probe()
Date: Fri, 21 Aug 2026 17:06:08 +0200	[thread overview]
Message-ID: <2026082119-footless-morbidly-8bba@gregkh> (raw)
In-Reply-To: <20260821121909.13556-1-kartikey406@gmail.com>

On Fri, Aug 21, 2026 at 05:49:09PM +0530, Deepanshu Kartikey wrote:
> ucsi_acpi_probe() dereferences the ACPI companion device pointer
> returned by ACPI_COMPANION() without checking it for NULL. While
> this driver is normally probed through ACPI device enumeration
> where a companion is always present, a platform_device can also be
> manually bound to any platform driver via the sysfs 'bind' file
> (bind_store() -> bus_find_device() -> driver_attach_device()),
> which matches purely on device name and bypasses ACPI matching.

Again, if someone does a manual bind, they get to keep the pieces that
break if something goes wrong.

I should just add a taint-flag to the kernel for this.  Well, maybe just
for unbind.  But really, don't do this on random drivers, bad things,
like this, can happen, and are in fact, guaranteed :)

thanks,

greg k-h

      reply	other threads:[~2026-08-21 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 12:19 [PATCH] usb: typec: ucsi_acpi: fix NULL pointer dereference in ucsi_acpi_probe() Deepanshu Kartikey
2026-08-21 15:06 ` Greg KH [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=2026082119-footless-morbidly-8bba@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=johan@kernel.org \
    --cc=kartikey406@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=pooja.katiyar@intel.com \
    --cc=syzbot+23cf45a9fce78e4e0dc1@syzkaller.appspotmail.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