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: <CAD-N9QVHp9XMxn6GjVqnPjuMrCJ8vnFjxAVtgjGM82Erv=MKQw@mail.gmail.com>
Date:   Fri, 23 Jul 2021 18:12:59 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     ath9k-devel@....qualcomm.com, Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Brooke Basile <brookebasile@...il.com>
Cc:     syzbot+6692c72009680f7c4eb2@...kaller.appspotmail.com,
        linux-wireless@...r.kernel.org,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ath9k: hif_usb: fix memory leak in ath9k_hif_usb_firmware_cb

On Fri, Jul 9, 2021 at 4:44 PM Dongliang Mu <mudongliangabcd@...il.com> wrote:
>
> The commit 03fb92a432ea ("ath9k: hif_usb: fix race condition between
> usb_get_urb() and usb_kill_anchored_urbs()") adds three usb_get_urb
> in ath9k_hif_usb_dealloc_tx_urbs and usb_free_urb.
>
> Fix this bug by adding corresponding usb_free_urb in
> ath9k_hif_usb_dealloc_tx_urbs other and hif_usb_stop.
>

Any idea about this patch?

> Reported-by: syzbot+6692c72009680f7c4eb2@...kaller.appspotmail.com
> Fixes: 03fb92a432ea ("ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()")
> Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
> ---
>  drivers/net/wireless/ath/ath9k/hif_usb.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 860da13bfb6a..bda91ff3289b 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -457,6 +457,7 @@ static void hif_usb_stop(void *hif_handle)
>                 usb_kill_urb(tx_buf->urb);
>                 list_del(&tx_buf->list);
>                 usb_free_urb(tx_buf->urb);
> +               usb_free_urb(tx_buf->urb);
>                 kfree(tx_buf->buf);
>                 kfree(tx_buf);
>                 spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
> @@ -779,6 +780,7 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)
>                 usb_kill_urb(tx_buf->urb);
>                 list_del(&tx_buf->list);
>                 usb_free_urb(tx_buf->urb);
> +               usb_free_urb(tx_buf->urb);
>                 kfree(tx_buf->buf);
>                 kfree(tx_buf);
>                 spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
> @@ -797,6 +799,7 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)
>                 usb_kill_urb(tx_buf->urb);
>                 list_del(&tx_buf->list);
>                 usb_free_urb(tx_buf->urb);
> +               usb_free_urb(tx_buf->urb);
>                 kfree(tx_buf->buf);
>                 kfree(tx_buf);
>                 spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ