[dpdk-dev] [PATCH] net/mlx5: fix use after free in mlx5_dma_unmap

Thomas Monjalon thomas at monjalon.net
Thu Jul 22 16:10:28 CEST 2021


10/07/2021 12:35, wangyunjian:
> From: Yunjian Wang <wangyunjian at huawei.com>
> 
> This patch fixes the use-after-free bug which was reported by Coverity
> Scan in the mlx5_dma_unmap function.
> 
> Coverity issue: 371679
> Fixes: 992e6df3dafe ("common/mlx5: free MR resource on device DMA unmap")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
> ---
>  	LIST_REMOVE(mr, mr);
> -	mlx5_mr_free(mr, sh->share_cache.dereg_mr_cb);
>  	DRV_LOG(DEBUG, "port %u remove MR(%p) from list", dev->data->port_id,
>  	      (void *)mr);
> +	mlx5_mr_free(mr, sh->share_cache.dereg_mr_cb);
>  	mlx5_mr_rebuild_cache(&sh->share_cache);

Sorry, it seems this fix has been integrated as part of this patch
(for no good reason):
	https://git.dpdk.org/dpdk/commit/?id=a7f34989e9




More information about the dev mailing list