Re: [PATCH] virtio-net: fix use after unmap/free for sg

2021-09-08 Thread Jason Wang
在 2021/9/2 下午1:44, Jason Wang 写道: When mergeable buffer is enabled, we try to set the num_buffers after the virtqueue elem has been unmapped. This will lead several issues, E.g a use after free when the descriptor has an address which belongs to the non direct access region. In this case we

[PATCH] virtio-net: fix use after unmap/free for sg

2021-09-01 Thread Jason Wang
When mergeable buffer is enabled, we try to set the num_buffers after the virtqueue elem has been unmapped. This will lead several issues, E.g a use after free when the descriptor has an address which belongs to the non direct access region. In this case we use bounce buffer that is allocated