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]
Date:	Fri, 27 May 2016 12:24:23 +0200
From:	Stefan Schmidt <stefan@....samsung.com>
To:	Baozeng Ding <sploving1@...il.com>, aar@...gutronix.de,
	davem@...emloft.net
Cc:	linux-wpan@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net] ieee802154: fix logic error in
 ieee802154_llsec_parse_dev_addr

Hello.

On 26/05/16 15:07, Baozeng Ding wrote:
> Fix a logic error to avoid potential null pointer dereference.
>
> Signed-off-by: Baozeng Ding<sploving1@...il.com>
> ---
>   net/ieee802154/nl802154.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
> index ca207db..116187b 100644
> --- a/net/ieee802154/nl802154.c
> +++ b/net/ieee802154/nl802154.c
> @@ -1289,8 +1289,8 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla,
>   				     nl802154_dev_addr_policy))
>   		return -EINVAL;
>   
> -	if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] &&
> -	    !attrs[NL802154_DEV_ADDR_ATTR_MODE] &&
> +	if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] ||
> +	    !attrs[NL802154_DEV_ADDR_ATTR_MODE] ||
>   	    !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
>   	      attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
>   		return -EINVAL;

Good catch!

Reviewed-by: Stefan Schmidt<stefan@....samsung.com>

regards
Stefan Schmidt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ