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: <DM5PR11MB00769C50DAD42239813F62E9EF84A@DM5PR11MB0076.namprd11.prod.outlook.com>
Date: Wed, 6 Dec 2023 03:59:33 +0000
From: <Arun.Ramadoss@...rochip.com>
To: <sean@...nix.com>, <Woojung.Huh@...rochip.com>,
	<UNGLinuxDriver@...rochip.com>, <andrew@...n.ch>, <ceggers@...i.de>,
	<netdev@...r.kernel.org>
Subject: RE: [PATCH] net: dsa: microchip: fix NULL pointer dereference in
 ksz_connect_tag_protocol()

Hi Sean,

> diff --git a/drivers/net/dsa/microchip/ksz_common.c
> b/drivers/net/dsa/microchip/ksz_common.c
> index 42db7679c360..1b9815418294 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -2623,9 +2623,10 @@ static int ksz_connect_tag_protocol(struct
> dsa_switch *ds,
>                                     enum dsa_tag_protocol proto)  {
>         struct ksz_tagger_data *tagger_data;
> -
> -       tagger_data = ksz_tagger_data(ds);
> -       tagger_data->xmit_work_fn = ksz_port_deferred_xmit;
> +       if (ksz_tagger_data(ds)) {
> +               tagger_data = ksz_tagger_data(ds);
> +               tagger_data->xmit_work_fn = ksz_port_deferred_xmit;
> +       }

Do we need to return error in case of xmit_work_fn is not initialized.

> 
>         return 0;
>  }
> --
> 2.42.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ