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: <20181210.120402.2087888281534527051.davem@davemloft.net>
Date:   Mon, 10 Dec 2018 12:04:02 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     yuehaibing@...wei.com
Cc:     h.morris@...coda.com, alex.aring@...il.com,
        stefan@...enfreihafen.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, linux-wpan@...r.kernel.org
Subject: Re: [PATCH net-next] ieee802154: ca8210: remove a dead branch

From: YueHaibing <yuehaibing@...wei.com>
Date: Mon, 10 Dec 2018 19:34:43 +0800

> Fix follwing gcc warning:
> 
> drivers/net/ieee802154/ca8210.c:730:10: warning:
>  comparison is always false due to limited range of data type [-Wtype-limits]
> 
> the variable 'len' is of type u8 and cannot greater than
> CA8210_SPI_BUF_SIZE , which is 256.
> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Then bug is the variable type here.

We are reading a u8 from buf[], then adding 2, which can overflow.

'len' should be an unsigned int or similar.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ