dmaengine: fix kref underflow and UAF in dma_chan_put()
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20260518-dmaengine-kref-fix-7b21acb09455Versions newest first
- v5 Latest4 patches 2 repliesApplied
- v44 patches 8 repliesSuperseded
- v33 patches 9 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 2 patches | 0 replies | Superseded | |
| v1 | 1 patch | 2 replies | Superseded |
Changes in v5 from the cover letter
- Use int return type and add __must_check for dma_device_get() (Frank)
- Drop the comment above synchronize_rcu() and note in the commit message
that this will delay for grace period dma_list_mutex held (Logan)
- Link to v4: https://lore.kernel.org/r/[email protected]
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | dmaengine: add dma_device_get() helperdrivers/ | +7 | 0 replies | |
| 2/4 | dmaengine: Fix device kref underflow in dma_chan_put()drivers/ | +3 | 0 replies | |
| 3/4 | dmaengine: fix use-after-free in dma_chan_put() and dma_release_channel()drivers/ | +4 | 0 replies | |
| 4/4 | dmaengine: wait for RCU readers before releasing dma_devicedrivers/ | +1 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Logan Gunthorpe | Frank Li |
|---|---|---|
| 1/4 | R-b | |
| 2/4 | R-b | R-b |
| 3/4 | R-b | R-b |
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/4] dmaengine: fix kref underflow and UAF in dma_chan_put()
Fix bugs related to dma_chan_put(), found while testing with SDXI[1].
[1]: https://lore.kernel.org/dmaengine/[email protected]
---
Changes in v5:
- Use int return type and add __must_check for dma_device_get() (Frank)
- Drop the comment above synchronize_rcu() and note in the commit message
that this will delay for grace period dma_list_mutex held (Logan)
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Add dma_device_get() helper (Frank)
- Drop dma_chan_put() move change (Frank)
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Add patch 3: add synchronize_rcu() to wait for RCU readers to prevent use-after-free. (Sashiko)
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Add patch 2 fixing the dma_chan_put()/dma_release_channel() use-after-free (sashiko)
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Shivank Garg (4):
dmaengine: add dma_device_get() helper
dmaengine: Fix device kref underflow in dma_chan_put()
dmaengine: fix use-after-free in dma_chan_put() and dma_release_channel()
dmaengine: wait for RCU readers before releasing dma_device
drivers/dma/dmaengine.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
---
base-commit: a4ff2be345d0abc943da8dd8da98151843b750dc
change-id: 20260518-dmaengine-kref-fix-7b21acb09455
Best regards,
Signature · 1 line
Shivank Garg <[email protected]>