Subject: Re: [PATCH AUTOSEL 5.18 24/53] drivers/net/ethernet/neterion/vxge: Fix a use-after-free bug in vxge-main.c

From: Jakub Kicinski <[email-masked]>
Date: Mon, 27 Jun 2022 21:38:47 -0700

On Mon, 27 Jun 2022 22:18:10 -0400 Sasha Levin wrote:
> From: Wentao_Liang <[email-masked]>
> 
> [ Upstream commit 8fc74d18639a2402ca52b177e990428e26ea881f ]
> 
> The pointer vdev points to a memory region adjacent to a net_device
> structure ndev, which is a field of hldev. At line 4740, the invocation
> to vxge_device_unregister unregisters device hldev, and it also releases
> the memory region pointed by vdev->bar0. At line 4743, the freed memory
> region is referenced (i.e., iounmap(vdev->bar0)), resulting in a
> use-after-free vulnerability. We can fix the bug by calling iounmap
> before vxge_device_unregister.

This is a dud see commit 877fe9d49b74 ("Revert
"drivers/net/ethernet/neterion/vxge: Fix a use-after-free bug in vxge-main.c"")