lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1715303950.5769324-2-xuanzhuo@linux.alibaba.com>
Date: Fri, 10 May 2024 09:19:10 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: Daniel Jurgens <danielj@...dia.com>
Cc: <mst@...hat.com>,
 <jasowang@...hat.com>,
 <xuanzhuo@...ux.alibaba.com>,
 <virtualization@...ts.linux.dev>,
 <davem@...emloft.net>,
 <edumazet@...gle.com>,
 <kuba@...nel.org>,
 <pabeni@...hat.com>,
 <jiri@...dia.com>,
 <axboe@...nel.dk>,
 Daniel Jurgens <danielj@...dia.com>,
 <netdev@...r.kernel.org>
Subject: Re: [PATCH] virtio_net: Fix memory leak in virtnet_rx_mod_work

On Thu, 9 May 2024 13:36:34 -0500, Daniel Jurgens <danielj@...dia.com> wrote:
> The pointer delcaration was missing the __free(kfree).
>
> Fixes: ff7c7d9f5261 ("virtio_net: Remove command data from control_buf")
> Reported-by: Jens Axboe <axboe@...nel.dk>
> Closes: https://lore.kernel.org/netdev/0674ca1b-020f-4f93-94d0-104964566e3f@kernel.dk/
> Signed-off-by: Daniel Jurgens <danielj@...dia.com>

Reviewed-by: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>


> ---
>  drivers/net/virtio_net.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index df6121c38a1b..42da535913ed 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2884,7 +2884,6 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs)
>
>  static int virtnet_close(struct net_device *dev)
>  {
> -	u8 *promisc_allmulti  __free(kfree) = NULL;
>  	struct virtnet_info *vi = netdev_priv(dev);
>  	int i;
>
> @@ -2905,11 +2904,11 @@ static void virtnet_rx_mode_work(struct work_struct *work)
>  {
>  	struct virtnet_info *vi =
>  		container_of(work, struct virtnet_info, rx_mode_work);
> +	u8 *promisc_allmulti  __free(kfree) = NULL;
>  	struct net_device *dev = vi->dev;
>  	struct scatterlist sg[2];
>  	struct virtio_net_ctrl_mac *mac_data;
>  	struct netdev_hw_addr *ha;
> -	u8 *promisc_allmulti;
>  	int uc_count;
>  	int mc_count;
>  	void *buf;
> --
> 2.45.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ