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: <576a57c3e8d9f7ad5bc28637ceac36d576309ca9.camel@linux.intel.com>
Date:   Mon, 05 Dec 2022 14:00:18 -0800
From:   Tedd Ho-Jeong An <tedd.an@...ux.intel.com>
To:     Wang ShaoBo <bobo.shaobowang@...wei.com>
Cc:     liwei391@...wei.com, marcel@...tmann.org, luiz.dentz@...il.com,
        johan.hedberg@...il.com, linux-bluetooth@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Bluetooth: btintel: Fix missing free skb in
 btintel_setup_combined()

Hi ShaoBo,

On Mon, 2022-12-05 at 21:53 +0800, Wang ShaoBo wrote:
> skb allocated by __hci_cmd_sync would not be used whether in checking
> for supported iBT hardware variants or after, we should free it in all
> error branches, this patch makes the case read version failed or default
> error case free skb before return.
> 
> Fixes: c86c7285bb08 ("Bluetooth: btintel: Fix the legacy bootloader returns tlv based version")
> Fixes: 019a1caa7fd2 ("Bluetooth: btintel: Refactoring setup routine for bootloader devices")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@...wei.com>

Reviewed-by: Tedd Ho-Jeong An <tedd.an@...el.com>

> ---
>  drivers/bluetooth/btintel.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
> index a657e9a3e96a..f6b4b7a1be4c 100644
> --- a/drivers/bluetooth/btintel.c
> +++ b/drivers/bluetooth/btintel.c
> @@ -2524,7 +2524,7 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>                  */
>                 err = btintel_read_version(hdev, &ver);
>                 if (err)
> -                       return err;
> +                       break;
>  
>                 /* Apply the device specific HCI quirks
>                  *
> @@ -2566,7 +2566,8 @@ static int btintel_setup_combined(struct hci_dev *hdev)
>         default:
>                 bt_dev_err(hdev, "Unsupported Intel hw variant (%u)",
>                            INTEL_HW_VARIANT(ver_tlv.cnvi_bt));
> -               return -EINVAL;
> +               err = -EINVAL;
> +               break;
>         }
>  
>  exit_error:

Regards,
Tedd Ho-Jeong An

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ