mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: yahia <yahia.a.abdrabou@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Re [PATCH v3] wmi/core: fix use-after-free in wmi_add_device()
Date: Mon, 22 Jun 2026 22:45:08 +0200	[thread overview]
Message-ID: <12f6446b-2f5a-4c9a-8f89-93b8db94b818@gmx.de> (raw)
In-Reply-To: <20260622202514.41504-1-yahia.a.abdrabou@gmail.com>

Am 22.06.26 um 22:25 schrieb yahia:

> Hi Armin,
>
> As per the documentation, The automatic cleanup is only
> triggered if the supplier probes or unbinds
>
>        Similarly, when the device link is added from supplier's ``->probe`` callback,
>        ``DL_FLAG_AUTOREMOVE_SUPPLIER`` causes the device link to be automatically
>        purged when the supplier fails to probe or later unbinds.
>
> To my understanding, the cleanup won't activate
> here because we don't unbind pdev nor does the
> probe fail.
>
> Best regards,
> yahia

True, but the associated wdev will be kept alive by the device link reference.
The cleanup will then happen when the platform driver unbinds.

So IMHO no UAF is taking place here, but we could optimize this by dropping
the flag to let the driver core to delete the device link earlier.

Thanks,
Armin Wolf


  reply	other threads:[~2026-06-22 20:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22  0:02 [PATCH] wmi/core Fix use-after-free in parse_wdg() yahia
2026-06-22 14:45 ` Armin Wolf
2026-06-22 19:04   ` [PATCH v2] wmi/core: fix use-after-free in wmi_add_device() yahia
2026-06-22 19:18     ` [PATCH v3] " yahia
2026-06-22 19:45       ` Armin Wolf
2026-06-22 20:25         ` Re " yahia
2026-06-22 20:45           ` Armin Wolf [this message]
2026-06-22 20:57             ` yahia
2026-06-22 21:19               ` Armin Wolf
2026-06-23  0:12                 ` yahia
2026-07-01  4:19                   ` Armin Wolf
2026-07-01  9:42                     ` yahia
2026-07-03 12:28       ` Ilpo Järvinen

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=12f6446b-2f5a-4c9a-8f89-93b8db94b818@gmx.de \
    --to=w_armin@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yahia.a.abdrabou@gmail.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