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] [day] [month] [year] [list]
Message-ID: <7f799a83-0709-d81a-6b45-88f8fafa3b3a@datenfreihafen.org>
Date:   Wed, 11 Aug 2021 22:08:39 +0200
From:   Stefan Schmidt <stefan@...enfreihafen.org>
To:     Tuo Li <islituo@...il.com>, alex.aring@...il.com,
        davem@...emloft.net, kuba@...nel.org
Cc:     linux-wpan@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, baijiaju1990@...il.com,
        TOTE Robot <oslab@...nghua.edu.cn>
Subject: Re: [PATCH] ieee802154: hwsim: fix possible null-pointer dereference
 in mac802154_hwsim.c

Hello.

On 11.08.21 04:36, Tuo Li wrote:
> In hwsim_new_edge_nl() and hwsim_set_edge_lqi(), if only one of the two
> info->attrs is NULL, the functions will not return.
>    if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] &&
>        !info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
> 	  return -EINVAL;
> 
> However, both of them may be dereferenced in the function
> nla_parse_nested_deprecated(), causing a null-pointer dereference.
> To fix this possible null-pointer dereference, the function returns
> -EINVAL if any info_attr is NULL.
> 
> Similarly, in hwsim_set_edge_lqi(), if only one of the two edge_attrs is
> NULL, both nla_get_u32() and nla_get_u8() will be called, causing a
> null-pointer dereference.
> Also, to fix this possible null-pointer dereference, the function returns
> -EINVAL if any edge_attr is NULL.
> 
> Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
> Signed-off-by: Tuo Li <islituo@...il.com>

Thanks for your patch. This has already been fixed with patches in the 
wpan tree.
https://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git/

I just sent a pull request including them to get pulled into net.

regards
Stefan Schmidt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ