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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Dec 2021 11:49:49 -0800
From:   Luiz Augusto von Dentz <luiz.dentz@...il.com>
To:     Manish Mandlik <mmandlik@...gle.com>
Cc:     Marcel Holtmann <marcel@...tmann.org>,
        ChromeOS Bluetooth Upstreaming 
        <chromeos-bluetooth-upstreaming@...omium.org>,
        "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>
Subject: Re: [PATCH v9 3/3] bluetooth: mgmt: Fix sizeof in mgmt_device_found()

Hi Manish,

On Thu, Dec 16, 2021 at 4:50 AM Manish Mandlik <mmandlik@...gle.com> wrote:
>
> Use correct sizeof() parameter while allocating skb.
>
> Signed-off-by: Manish Mandlik <mmandlik@...gle.com>
> ---
>
> (no changes since v8)
>
> Changes in v8:
> - New patch in the series.
>
>  net/bluetooth/mgmt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
> index c65247b5896c..5fd29bd399f1 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -9709,7 +9709,7 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
>
>         /* Allocate skb. The 5 extra bytes are for the potential CoD field */
>         skb = mgmt_alloc_skb(hdev, MGMT_EV_DEVICE_FOUND,
> -                            sizeof(ev) + eir_len + scan_rsp_len + 5);
> +                            sizeof(*ev) + eir_len + scan_rsp_len + 5);
>         if (!skb)
>                 return;
>
> --
> 2.34.1.173.g76aa8bc2d0-goog

There is already a patch addressing this:

https://patchwork.kernel.org/project/bluetooth/patch/20211213212650.2067066-1-luiz.dentz@gmail.com/

Please use that instead and if that works for you reply adding Tested-by.


-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ