ublk: harden user buffer handling
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Changes in v2 from the cover letter
- Check import_ubuf() return value (Ming)
- Avoid calling blk_update_request() with nr_bytes=0
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ublk: check import_ubuf() return valuedrivers/ | +8 | 0 replies | |
| 2/3 | ublk: check for ublk_unmap_io() returning 0drivers/ | +7 | 0 replies | |
| 3/3 | ublk: remove WARN_ON_ONCE() in ublk_unmap_io()drivers/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] ublk: harden user buffer handling
For ublk devices not using user copy or zero copy, the ublk driver copies request data to/from an arbitrary buffer provided by the userspace ublk server on each I/O.
Fix several bugs where the kernel driver is overly trusting of the userspace buffer. Ensure that an invalid userspace buffer at worst results in a failed or requeued I/O and can't trigger panics or undefined behavior.
v2:
- Check import_ubuf() return value (Ming)
- Avoid calling blk_update_request() with nr_bytes=0
v1: https://lore.kernel.org/linux-block/[email protected]/
Caleb Sander Mateos (3):
ublk: check import_ubuf() return value
ublk: check for ublk_unmap_io() returning 0
ublk: remove WARN_ON_ONCE() in ublk_unmap_io()
drivers/block/ublk_drv.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
Signature · 1 line
2.54.0