[PATCH 1/1] net: don't memcpy to NULL

Tom Rini trini at konsulko.com
Fri Dec 23 16:01:05 CET 2022


On Wed, Dec 07, 2022 at 11:53:29AM +0100, Heinrich Schuchardt wrote:

> In ndisc_receive() 7 bytes are copied from a buffer of size 6 to NULL.
> 
> net_nd_packet_mac is a pointer. If it is NULL, we should set it to the
> address of the buffer with the MAC address.
> 
> Addresses-Coverity-ID: 430974 ("Out-of-bounds access")
> Fixes: c6610e1d90ea ("net: ipv6: Add Neighbor Discovery Protocol (NDP)")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov at yadro.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221223/d45af328/attachment.sig>


More information about the U-Boot mailing list