Chrome platform driver development
 help / color / mirror / Atom feed
* [PATCH v3 0/4] platform/chrome: cros_ec_chardev: Fix a potential UAF
@ 2026-05-25  5:26 Tzung-Bi Shih
  2026-05-25  5:26 ` [PATCH v3 1/4] platform/chrome: cros_ec_chardev: Introduce chardev_data Tzung-Bi Shih
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2026-05-25  5:26 UTC (permalink / raw)
  To: Benson Leung, Jason Gunthorpe, Greg Kroah-Hartman
  Cc: tzungbi, chrome-platform, linux-kernel

  This series addresses a potential Use-After-Free error when a device is
deregistered while file operations are still in progress or files remain
open in cros_ec_chardev.

- Patches 1 to 3 are preparation steps in cros_ec_chardev driver.  They
  introduce reference counting for platform driver data and an event
  relayer.  This removes the direct access to `ec_dev->event_notifier`
  in `cros_ec_chardev_release()`.
- Patch 4 introduces a rwsem for protecting `ec_dev` to prevent the UAF
  error.

---
v3:
- Address review comment in patch 4.

v2: https://lore.kernel.org/all/20260516143017.18560-1-tzungbi@kernel.org
- Merge patches 5 to 7 from
  https://lore.kernel.org/all/20260427134659.95181-1-tzungbi@kernel.org.

v1: Doesn't exist.

Tzung-Bi Shih (4):
  platform/chrome: cros_ec_chardev: Introduce chardev_data
  platform/chrome: cros_ec_chardev: Move data to chardev_pdata
  platform/chrome: cros_ec_chardev: Add event relayer
  platform/chrome: cros_ec_chardev: Introduce rwsem for protecting
    ec_dev

 drivers/platform/chrome/cros_ec_chardev.c | 146 +++++++++++++++++-----
 1 file changed, 116 insertions(+), 30 deletions(-)

-- 
2.54.0.794.g4f17f83d09-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-28  4:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25  5:26 [PATCH v3 0/4] platform/chrome: cros_ec_chardev: Fix a potential UAF Tzung-Bi Shih
2026-05-25  5:26 ` [PATCH v3 1/4] platform/chrome: cros_ec_chardev: Introduce chardev_data Tzung-Bi Shih
2026-05-25  5:26 ` [PATCH v3 2/4] platform/chrome: cros_ec_chardev: Move data to chardev_pdata Tzung-Bi Shih
2026-05-25  5:26 ` [PATCH v3 3/4] platform/chrome: cros_ec_chardev: Add event relayer Tzung-Bi Shih
2026-05-25  5:26 ` [PATCH v3 4/4] platform/chrome: cros_ec_chardev: Introduce rwsem for protecting ec_dev Tzung-Bi Shih
2026-05-28  4:33   ` Tzung-Bi Shih
2026-05-28  2:21 ` [PATCH v3 0/4] platform/chrome: cros_ec_chardev: Fix a potential UAF Tzung-Bi Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox