Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E73CC352A1 for ; Tue, 6 Dec 2022 14:52:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A1968549D; Tue, 6 Dec 2022 15:52:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="EU35nF7G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47331854AA; Tue, 6 Dec 2022 15:52:02 +0100 (CET) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A53885472 for ; Tue, 6 Dec 2022 15:51:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-wm1-x32f.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so14457268wmb.2 for ; Tue, 06 Dec 2022 06:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=SnCcrFMC8oahLirHs15zYS4DO9sNao/NseBpIIZeDRk=; b=EU35nF7GrK4joVbMzvUdSGPE/SE8B5+yvN2KKy591yXzL9kq0/UBhNv2DX5Rs2FOJI 15U5oyML65D5+V+DVq1zZYvFgRCZrQyjjAuHxrOJZ3PDe1RNjWyKu+W0QFPtPQYnMYdP p79GdTG+bf2kJMgyU6h7yVgW1aW1W5Ka3+p0Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SnCcrFMC8oahLirHs15zYS4DO9sNao/NseBpIIZeDRk=; b=UXxuTX7BIGAi6thQV0Ff6RgQ3iyV1a/8ixgwTVgxTFzOHMB039Kz5xGHa7uvB69FUw O+hoqjIdBWNxvykWEgcRjuycm/EEZJrlukw/FC3D+Hie/Hy82xTY+st6UIo6e710jIFP u6yQG1l0O4Alv6AppH8v0RNJ/Dx/nwrdoPzD56qgopJJbwpKylwust7bwbXQPep9OU1G 1derYqc6hObcXYAfvvNnyUeDkuHgIiBzZeofT48K3QpE+42/yXhyWkS6186BcRQ7/YBr Z3o8B/ZJhRmEdfPJ6QL0EkanafFr5K7Eaud7R+u3SG4PtlY1Zq/L13aMsqlAw7d2vyNZ 65fw== X-Gm-Message-State: ANoB5plvGAW9awIao4QX133vlqoTcKq5aYY/gCEn+uJ/c9QxwtQX8MMm TKtZxO+Hhi/R42cPJYcy2GOfSmtQPLVFnYsn X-Google-Smtp-Source: AA0mqf5pWUm3HCeiqkRBMMu2t+HDsIwP/+puefMJtGZ5k7PMyEu9wxYrmSWcyZf16JmQo4/a2yTcpg== X-Received: by 2002:a05:600c:1e8a:b0:3d1:cda5:bdc7 with SMTP id be10-20020a05600c1e8a00b003d1cda5bdc7mr6362789wmb.204.1670338318743; Tue, 06 Dec 2022 06:51:58 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-40ab-ff29-04a6-7f8f.res6.spectrum.com. [2603:6081:7b00:6400:40ab:ff29:4a6:7f8f]) by smtp.gmail.com with ESMTPSA id az23-20020adfe197000000b002425504ae7dsm8841349wrb.80.2022.12.06.06.51.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 06:51:58 -0800 (PST) Date: Tue, 6 Dec 2022 09:51:55 -0500 From: Tom Rini To: u-boot@lists.denx.de Subject: [tom.rini@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot] Message-ID: <20221206145155.GJ3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="R4WX1n68Ri6bLxuv" Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --R4WX1n68Ri6bLxuv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's the latest report ---------- Forwarded message --------- =46rom: Date: Mon, Dec 5, 2022, 3:35 PM Subject: New Defects reported by Coverity Scan for Das U-Boot To: Hi, Please find the latest report on new defect(s) introduced to Das U-Boot found with Coverity Scan. 4 new defect(s) introduced to Das U-Boot found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 4 of 4 defect(s) ** CID 430977: Null pointer dereferences (FORWARD_NULL) /net/ndisc.c: 268 in ndisc_receive() ___________________________________________________________________________= _____________________________ *** CID 430977: Null pointer dereferences (FORWARD_NULL) /net/ndisc.c: 268 in ndisc_receive() 262 sizeof(struct in6_addr)) =3D=3D 0) && 263 ndisc_has_option(ip6, ND_OPT_TARGET_LL_ADDR)) { 264 ndisc_extract_enetaddr(ndisc, neigh_eth_addr); 265 266 /* save address for later use */ 267 if (!net_nd_packet_mac) >>> CID 430977: Null pointer dereferences (FORWARD_NULL) >>> Passing null pointer "net_nd_packet_mac" to "memcpy", which dereferences it. [Note: The source code implementation of the function has been overridden by a builtin model.] 268 memcpy(net_nd_packet_mac, neigh_eth_addr, 7); 269 270 /* modify header, and transmit it */ 271 memcpy(((struct ethernet_hdr *)net_nd_tx_packet)->et_dest, 272 neigh_eth_addr, 6); 273 ** CID 430976: Control flow issues (DEADCODE) /net/tftp.c: 744 in sanitize_tftp_block_size_option() ___________________________________________________________________________= _____________________________ *** CID 430976: Control flow issues (DEADCODE) /net/tftp.c: 744 in sanitize_tftp_block_size_option() 738 } 739 /* 740 * If not CONFIG_IP_DEFRAG, cap at the same value as 741 * for tftp put, namely normal MTU minus protocol 742 * overhead. 743 */ >>> CID 430976: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "[[fallthrough]];". 744 fallthrough; 745 case TFTPPUT: 746 default: 747 /* 748 * U-Boot does not support IP fragmentation on TX, so 749 * this must be small enough that it fits normal MTU ** CID 430975: Control flow issues (MISSING_BREAK) /net/net.c: 1270 in net_process_received_packet() ___________________________________________________________________________= _____________________________ *** CID 430975: Control flow issues (MISSING_BREAK) /net/net.c: 1270 in net_process_received_packet() 1264 #ifdef CONFIG_CMD_RARP 1265 case PROT_RARP: 1266 rarp_receive(ip, len); 1267 break; 1268 #endif 1269 #if IS_ENABLED(CONFIG_IPV6) >>> CID 430975: Control flow issues (MISSING_BREAK) >>> The case for value "34525" is not terminated by a "break" statement. 1270 case PROT_IP6: 1271 net_ip6_handler(et, (struct ip6_hdr *)ip, len); 1272 #endif 1273 case PROT_IP: 1274 debug_cond(DEBUG_NET_PKT, "Got IP\n"); 1275 /* Before we start poking the header, make sure it is there */ ** CID 430974: Memory - corruptions (OVERRUN) /net/ndisc.c: 268 in ndisc_receive() ___________________________________________________________________________= _____________________________ *** CID 430974: Memory - corruptions (OVERRUN) /net/ndisc.c: 268 in ndisc_receive() 262 sizeof(struct in6_addr)) =3D=3D 0) && 263 ndisc_has_option(ip6, ND_OPT_TARGET_LL_ADDR)) { 264 ndisc_extract_enetaddr(ndisc, neigh_eth_addr); 265 266 /* save address for later use */ 267 if (!net_nd_packet_mac) >>> CID 430974: Memory - corruptions (OVERRUN) >>> Overrunning array "neigh_eth_addr" of 6 bytes by passing it to a function which accesses it at byte offset 6 using argument "7UL". [Note: The source code implementation of the function has been overridden by a builtin model.] 268 memcpy(net_nd_packet_mac, neigh_eth_addr, 7); 269 270 /* modify header, and transmit it */ 271 memcpy(((struct ethernet_hdr *)net_nd_tx_packet)->et_dest, 272 neigh_eth_addr, 6); 273 --=20 Tom --R4WX1n68Ri6bLxuv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOPVwcACgkQFHw5/5Y0 tyzdwQv/cx6jZGivMjw2iYf2VLHQ7R3SPBx7GwpwO4T00XN2HGlq6SIEcdA7CkGF V8+NE6tAFznaRkJIqpbja2u05W4N6ONLOhdK9d5/2biBmwwSt6UeaSUnLmRxRGZg ALt6wbZOtKStsmvMqQ1zcofju9P2TZgg5hGlkB49a5nrcXQRjmKGHCi2Z49j3U1U BC71K2qKbd3fMb7iE3WMH36FE9z/4f0pv0j0pWbdR0MQ42nivjze+r0uVRcs5G9G v8IPIHAT6Z68pu0S3G+XTgEWpbbr2FXaoObNL8QbbqmWryanwHmgGnC19/lRGSLw 0Z5Q5rfKcrYCHL5404egZ114lBaMEphci0FO8VnePMh291FK00K6XuMwQqL/cjyA PXAGUAunjImpQMGQj10QarBBpac4xvZ4B0Xvhp8kVMg7VvRZVT5Zw5xJ6kXz1hpE PPckln05L8Fy6j1aOU2Ajj7t/JqiawMP6ArNaW40onDvvqUtvNqqQI3gDGidR67D aDRWzQ2a =oncA -----END PGP SIGNATURE----- --R4WX1n68Ri6bLxuv--