All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ublk: harden user buffer handling
@ 2026-07-29 17:10 Caleb Sander Mateos
  2026-07-29 17:10 ` [PATCH v2 1/3] ublk: check import_ubuf() return value Caleb Sander Mateos
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Caleb Sander Mateos @ 2026-07-29 17:10 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe; +Cc: linux-block, linux-kernel, Caleb Sander Mateos

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/20260727162450.2921500-1-csander@purestorage.com/

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(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-08-04  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 17:10 [PATCH v2 0/3] ublk: harden user buffer handling Caleb Sander Mateos
2026-07-29 17:10 ` [PATCH v2 1/3] ublk: check import_ubuf() return value Caleb Sander Mateos
2026-07-29 17:10 ` [PATCH v2 2/3] ublk: check for ublk_unmap_io() returning 0 Caleb Sander Mateos
2026-07-29 17:10 ` [PATCH v2 3/3] ublk: remove WARN_ON_ONCE() in ublk_unmap_io() Caleb Sander Mateos
2026-08-04  2:32 ` [PATCH v2 0/3] ublk: harden user buffer handling Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.