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: <CAOMZO5DLdR00FY01r2z=RvSrn4vNEZ+Z3OS0KWB95DGt=3fh2w@mail.gmail.com>
Date:   Sat, 22 Apr 2017 14:30:25 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Maksim Salau <maksim.salau@...il.com>
Cc:     Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        Maximilian Schneider <max@...neidersoft.net>,
        Hubert Denkmair <hubert@...kmair.de>,
        Wolfram Sang <wsa-dev@...g-engineering.com>,
        Ethan Zonca <e@...anzonca.com>, linux-can@...r.kernel.org,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: can: usb: gs_usb: Fix buffer on stack

On Sat, Apr 22, 2017 at 1:56 PM, Maksim Salau <maksim.salau@...il.com> wrote:
> Allocate buffer on HEAP instead of STACK for a local structure
> that is to be sent using usb_control_msg().
>
> Signed-off-by: Maksim Salau <maksim.salau@...il.com>
> ---
>  drivers/net/can/usb/gs_usb.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
> index a0dabd4..98f972a 100644
> --- a/drivers/net/can/usb/gs_usb.c
> +++ b/drivers/net/can/usb/gs_usb.c
> @@ -740,13 +740,18 @@ static const struct net_device_ops gs_usb_netdev_ops = {
>  static int gs_usb_set_identify(struct net_device *netdev, bool do_identify)
>  {
>         struct gs_can *dev = netdev_priv(netdev);
> -       struct gs_identify_mode imode;
> +       struct gs_identify_mode *imode = NULL;

No need to assign imode to NULL here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ