public inbox for chrome-platform@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/3] platform/chrome: Fix a possible UAF via ref_proxy
@ 2025-08-14  9:10 Tzung-Bi Shih
  2025-08-14  9:10 ` [PATCH 1/3] lib: Add ref_proxy module Tzung-Bi Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Tzung-Bi Shih @ 2025-08-14  9:10 UTC (permalink / raw)
  To: bleung
  Cc: tzungbi, dawidn, chrome-platform, akpm, gregkh, linux-kernel,
	Laurent Pinchart, Bartosz Golaszewski, Wolfram Sang

This is a follow-up series of [1].  It tries to fix a possible UAF in the
fops of cros_ec_chardev after the underlying protocol device has gone by
using a newly introduced ref_proxy library.

The 1st patch introduces the ref_proxy which is an implementation of ideas
from the talk [2].

The 2nd patch converts existing protocol devices to resource providers
of cros_ec_device.

The 3rd patch converts cros_ec_chardev to a resource consumer of
cros_ec_device to fix the UAF.

[1] https://lore.kernel.org/chrome-platform/20250721044456.2736300-6-tzungbi@kernel.org/
[2] https://lpc.events/event/17/contributions/1627/

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>

Tzung-Bi Shih (3):
  lib: Add ref_proxy module
  platform/chrome: Protect cros_ec_device lifecycle with ref_proxy
  platform/chrome: cros_ec_chardev: Consume cros_ec_device via ref_proxy

 drivers/platform/chrome/Kconfig             |   8 +-
 drivers/platform/chrome/cros_ec_chardev.c   | 125 ++++++++-----
 drivers/platform/chrome/cros_ec_i2c.c       |   5 +
 drivers/platform/chrome/cros_ec_ishtp.c     |   5 +
 drivers/platform/chrome/cros_ec_lpc.c       |   5 +
 drivers/platform/chrome/cros_ec_rpmsg.c     |   5 +
 drivers/platform/chrome/cros_ec_spi.c       |   4 +
 drivers/platform/chrome/cros_ec_uart.c      |   5 +
 include/linux/platform_data/cros_ec_proto.h |   3 +
 include/linux/ref_proxy.h                   |  37 ++++
 lib/Kconfig                                 |   3 +
 lib/Makefile                                |   1 +
 lib/ref_proxy.c                             | 184 ++++++++++++++++++++
 13 files changed, 348 insertions(+), 42 deletions(-)
 create mode 100644 include/linux/ref_proxy.h
 create mode 100644 lib/ref_proxy.c

-- 
2.51.0.rc1.163.g2494970778-goog


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

end of thread, other threads:[~2025-08-16 11:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  9:10 [PATCH 0/3] platform/chrome: Fix a possible UAF via ref_proxy Tzung-Bi Shih
2025-08-14  9:10 ` [PATCH 1/3] lib: Add ref_proxy module Tzung-Bi Shih
2025-08-14 10:03   ` Greg KH
2025-08-15  5:35     ` Tzung-Bi Shih
2025-08-14 10:05   ` Greg KH
2025-08-14 10:27     ` Danilo Krummrich
2025-08-14 10:55   ` Danilo Krummrich
2025-08-15  5:36     ` Tzung-Bi Shih
2025-08-14  9:10 ` [PATCH 2/3] platform/chrome: Protect cros_ec_device lifecycle with ref_proxy Tzung-Bi Shih
2025-08-15 13:37   ` kernel test robot
2025-08-14  9:10 ` [PATCH 3/3] platform/chrome: cros_ec_chardev: Consume cros_ec_device via ref_proxy Tzung-Bi Shih
2025-08-15 21:06   ` kernel test robot
2025-08-16 11:46   ` kernel test robot

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