Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vhost: fix split ring potential buffer overflow
[ upstream commit 134228c ] In vhost datapath, descriptor's length are mostly used in two coherent operations. First step is used for address translation, second step is used for memory transaction from guest to host. But the interval between two steps will give a window for malicious guest, in which can change descriptor length after vhost calculated buffer size. Thus may lead to buffer overflow in vhost side. This potential risk can be eliminated by accessing the descriptor length once. Fixes: 1be4ebb ("vhost: support indirect descriptor in mergeable Rx") Signed-off-by: Marvin Liu <yong.liu@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
- Loading branch information