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]
Date:   Fri, 7 Oct 2022 09:44:58 +0200
From:   Stefan Schmidt <stefan@...enfreihafen.org>
To:     Wei Yongjun <weiyongjun@...weicloud.com>,
        Haimin Zhang <tcs.kernel@...il.com>,
        Alexander Aring <alex.aring@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>, linux-wpan@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH] net: ieee802154: fix error return code in dgram_bind()

Hello.

On 19.09.22 18:08, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@...wei.com>
> 
> Fix to return error code -EINVAL from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: 94160108a70c ("net/ieee802154: fix uninit value bug in dgram_sendmsg")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
>   net/ieee802154/socket.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
> index 7889e1ef7fad..35c54dce74f9 100644
> --- a/net/ieee802154/socket.c
> +++ b/net/ieee802154/socket.c
> @@ -498,8 +498,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)
>   	if (err < 0)
>   		goto out;
>   
> -	if (addr->family != AF_IEEE802154)
> +	if (addr->family != AF_IEEE802154) {
> +		err = -EINVAL;
>   		goto out;
> +	}
>   
>   	ieee802154_addr_from_sa(&haddr, &addr->addr);
>   	dev = ieee802154_get_dev(sock_net(sk), &haddr);
> 

This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!

regards
Stefan Schmidt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ