[PATCH 1/2] vhost: fix error handling in virtio_dev_tx_split

2022-08-01 Thread Claudio Fontana
in virtio_dev_split we add a check for invalid nr_vec, mainly for nr_vec == 0 (but add a check for BUF_VECTOR_MAX too), and bail out before calling desc_to_mbuf, otherwise in desc_to_mbuf we end up trying to memcpy from a source address buf_vec[0] that is an uninitialized stack variable. This shou

[PATCH 1/2] vhost: fix error handling in virtio_dev_tx_split

2022-07-31 Thread Claudio Fontana
in virtio_dev_split we add a check for invalid nr_vec, mainly for nr_vec == 0 (but add a check for BUF_VECTOR_MAX too), and bail out before calling desc_to_mbuf, otherwise in desc_to_mbuf we end up trying to memcpy from a source address buf_vec[0] that is an uninitialized stack variable. This shou