platform/chrome: cros_ec_chardev: Fix a potential UAF
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/24 patches 2 repliesIn review
- v2 posting 2/24 patches 3 repliesSuperseded
- v3 posting 1/28 patches 15 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 1/2 | 6 patches | 0 replies | Superseded | |
| v1 | 2 patches | 3 replies | Superseded |
Changes in v3 from the cover letter
- Address review comment in patch 4.
Patches in v3 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | platform/chrome: cros_ec_chardev: Introduce chardev_datadrivers/ | +39 | 0 replies | |
| 2/4 | platform/chrome: cros_ec_chardev: Move data to chardev_pdatadrivers/ | +20 | 0 replies | |
| 3/4 | platform/chrome: cros_ec_chardev: Add event relayerdrivers/ | +29 | 0 replies | |
| 4/4 | platform/chrome: cros_ec_chardev: Introduce rwsem for protecting ec_devdrivers/ | +34 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Jason Gunthorpe |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/4] platform/chrome: cros_ec_chardev: Fix a potential UAF
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/[email protected]
- Merge patches 5 to 7 from
https://lore.kernel.org/all/[email protected].
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(-)
Signature · 1 line
2.54.0.794.g4f17f83d09-goog