Skip to content

Validate used buffer length

Jason Wang lkml virtualization 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 28 repliesIn review
  2. v44 patches 3 repliesSuperseded

Changes in v5 from the cover letter

- Fix the out of date description in the commit log

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4virtio_ring: validate used buffer lengthdrivers/virtio/virtio_ring.c include/linux/virtio.h+62 -028 replies
2/4virtio-net: don't let virtio core to validate used lengthdrivers/net/virtio_net.c+1 -00 replies
3/4virtio-blk: don't let virtio core to validate used lengthdrivers/block/virtio_blk.c+1 -00 replies
4/4virtio-scsi: don't let virtio core to validate used buffer lengthdrivers/scsi/virtio_scsi.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH V5 0/4] Validate used buffer length

Hi All:

This patch tries to validate the used buffer length in the virtio core. This help to eliminate the unexpected result caused by buggy or mailicous devices. For the drivers that can do the validation itself, they can ask the virtio core to suppress the check.

Changes since V4:

- Fix the out of date description in the commit log

Changes since V3:

- Initialize the buflen to zero when the validation is done by the driver.

Jason Wang (4):
virtio_ring: validate used buffer length
virtio-net: don't let virtio core to validate used length
virtio-blk: don't let virtio core to validate used length
virtio-scsi: don't let virtio core to validate used buffer length

 drivers/block/virtio_blk.c   |  1 +
 drivers/net/virtio_net.c     |  1 +
 drivers/scsi/virtio_scsi.c   |  1 +
 drivers/virtio/virtio_ring.c | 60 ++++++++++++++++++++++++++++++++++++
 include/linux/virtio.h       |  2 ++
 5 files changed, 65 insertions(+)
Signature · 1 line
2.25.1