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: <CAB4CAwf34TFGqTCz0BGGj3MC4pTTW10qvfJaPsNxMcXB6_EbEg@mail.gmail.com>
Date:   Fri, 20 Sep 2019 18:23:40 +0800
From:   Chris Chiu <chiu@...lessm.com>
To:     Navid Emamdoost <navid.emamdoost@...il.com>
Cc:     emamd001@....edu, smccaman@....edu, kjlu@....edu,
        Jes Sorensen <Jes.Sorensen@...il.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rtl8xxxu: prevent leaking urb

On Fri, Sep 20, 2019 at 11:01 AM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
> should be released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
Reviewed-by: Chris Chiu <chiu@...lessm.com>


> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -5443,6 +5443,7 @@ static int rtl8xxxu_submit_int_urb(struct ieee80211_hw *hw)
>         ret = usb_submit_urb(urb, GFP_KERNEL);
>         if (ret) {
>                 usb_unanchor_urb(urb);
> +               usb_free_urb(urb);
>                 goto error;
>         }
You're right. There's a usb_alloc_urb in the beginning of this
function and should be
handled after submit failure.

Chris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ