From mboxrd@z Thu Jan 1 00:00:00 1970 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 E20A4C001DC for ; Thu, 27 Jul 2023 17:38:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 288AE8684C; Thu, 27 Jul 2023 19:38:41 +0200 (CEST) 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="Gmntbss/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B67AB8683A; Thu, 27 Jul 2023 19:38:37 +0200 (CEST) Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) (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 C08018624A for ; Thu, 27 Jul 2023 19:38:32 +0200 (CEST) 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-vs1-xe36.google.com with SMTP id ada2fe7eead31-4435508cff9so521921137.0 for ; Thu, 27 Jul 2023 10:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690479511; x=1691084311; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=+RDgVaSwBGofgAqQ8C5Stae3cV23QwCT6r/QWETSsAA=; b=Gmntbss/xZUsTPLhvQwCSqStWz+bZEMD/iNkyeaV/T0DIsKSHDCu+j59HJEO7JcFxs orFrB05AXp5WZ5pUcK3umGhgT4cy1dBh+sRX5W9MSa61PfbpOHJWztmdOUO4vFhHCvc5 VZs4wrCSzbtjizENULYtSp9j1NxvWAgEwRMW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690479511; x=1691084311; 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=+RDgVaSwBGofgAqQ8C5Stae3cV23QwCT6r/QWETSsAA=; b=TGmtUypd8U8XeujAPPr0Aqp7NO6ZMmdByVDiz3wZPLwMX1+iWh2gGdDB44G7bAsHGX wiVBJMg+Z/BHDs0NDslfanoS++roh1+ZoIO7GV+YEredcrXiBSlzRtJFf6IyAsjyKmt6 THg8/5VtSAYYtJyQP05Cq/HbjiPwp5MWOctDP/U81ghWNsxZ7Jswn4KKZb2l5Xno6OHs B+Rf1fLqMQqZ+z2QWlJlCPxUewtVA0ImkrwRWnSWYwUX7BcQTAkI1vWMGAR+YSNrUAS6 nlzAqVr7ZL5ZSLR7/WCdNYYBvK99+u/9XEaVeP8fgnmzHROeWA7QWeh3BXM1ofqSmnXf LgbQ== X-Gm-Message-State: ABy/qLbr7E6kKTtJ6K5G5vm7qLYFjgwrDwYjQp1XnYNbwwPeBOHC98zc LBxDmWXplkqmVk2v4yt0qLG28aOY6VgrLn2Rbj3fDQ== X-Google-Smtp-Source: APBJJlFkD3KD0PIdR9RXGY4DnW6wGr61Xs8aAseacf3YhV4OcHaeuQWr3XuKV4GezNypz4wfnUC/sQ== X-Received: by 2002:a67:f749:0:b0:443:6afe:902b with SMTP id w9-20020a67f749000000b004436afe902bmr187942vso.24.1690479511306; Thu, 27 Jul 2023 10:38:31 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-96a7-b348-5b90-69b9.res6.spectrum.com. [2603:6081:7b00:6400:96a7:b348:5b90:69b9]) by smtp.gmail.com with ESMTPSA id s10-20020a67c38a000000b00446d932c1d1sm279256vsj.33.2023.07.27.10.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 10:38:30 -0700 (PDT) Date: Thu, 27 Jul 2023 13:38:29 -0400 From: Tom Rini To: u-boot@lists.denx.de, Simon Glass , Heinrich Schuchardt Subject: [tom.rini@gmail.com: Fwd: New Defects reported by Coverity Scan for Das U-Boot] Message-ID: <20230727173829.GJ3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nkwl5M91DKMfYlSI" 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.8 at phobos.denx.de X-Virus-Status: Clean --nkwl5M91DKMfYlSI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here's the latest report. ---------- Forwarded message --------- =46rom: Date: Tue, Jul 25, 2023 at 5:29=E2=80=AFPM 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. 5 new defect(s) introduced to Das U-Boot found with Coverity Scan. 30 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 5 of 5 defect(s) ** CID 463147: Insecure data handling (TAINTED_SCALAR) ___________________________________________________________________________= _____________________________ *** CID 463147: Insecure data handling (TAINTED_SCALAR) /common/fdt_support.c: 1115 in fdt_copy_fixed_partitions() 1109 res =3D fdt_setprop_string(blob, suboff, "l= abel", 1110 ofnode_read_string(subnode, "label")); 1111 if (res) 1112 return res; 1113 1114 reg =3D ofnode_get_property(subnode, "reg",= &len); >>> CID 463147: Insecure data handling (TAINTED_SCALAR) >>> Passing tainted expression "len" to "fdt_setprop", which uses it as= an offset. 1115 res =3D fdt_setprop(blob, suboff, "reg", reg, len); 1116 if (res) 1117 return res; 1118 } 1119 1120 /* go to next fixed-partitions node */ ** CID 463146: Null pointer dereferences (NULL_RETURNS) ___________________________________________________________________________= _____________________________ *** CID 463146: Null pointer dereferences (NULL_RETURNS) /common/fdt_support.c: 1115 in fdt_copy_fixed_partitions() 1109 res =3D fdt_setprop_string(blob, suboff, "l= abel", 1110 ofnode_read_string(subnode, "label")); 1111 if (res) 1112 return res; 1113 1114 reg =3D ofnode_get_property(subnode, "reg",= &len); >>> CID 463146: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "NULL" "reg" when calling "fd= t_setprop". 1115 res =3D fdt_setprop(blob, suboff, "reg", reg, len); 1116 if (res) 1117 return res; 1118 } 1119 1120 /* go to next fixed-partitions node */ ** CID 463145: Error handling issues (CHECKED_RETURN) /lib/efi_loader/efi_firmware.c: 176 in efi_firmware_get_lsv_from_dtb() ___________________________________________________________________________= _____________________________ *** CID 463145: Error handling issues (CHECKED_RETURN) /lib/efi_loader/efi_firmware.c: 176 in efi_firmware_get_lsv_from_dtb() 170 fdt_for_each_subnode(offset, fdt, parent) { 171 efi_guid_t guid; 172 173 guid_str =3D fdt_getprop(fdt, offset, "image-type-id", &len); 174 if (!guid_str) 175 continue; >>> CID 463145: Error handling issues (CHECKED_RETURN) >>> Calling "uuid_str_to_bin" without checking return value (as is done= elsewhere 7 out of 8 times). 176 uuid_str_to_bin(guid_str, guid.b, UUID_STR_FORMAT_G= UID); 177 178 val =3D fdt_getprop(fdt, offset, "image-index", &le= n); 179 if (!val) 180 continue; 181 index =3D fdt32_to_cpu(*val); ** CID 463144: (CHECKED_RETURN) /boot/expo.c: 257 in expo_apply_theme() /boot/expo.c: 258 in expo_apply_theme() /boot/expo.c: 259 in expo_apply_theme() ___________________________________________________________________________= _____________________________ *** CID 463144: (CHECKED_RETURN) /boot/expo.c: 257 in expo_apply_theme() 251 struct expo_theme *theme =3D &exp->theme; 252 int ret; 253 254 log_debug("Applying theme %s\n", ofnode_get_name(node)); 255 256 memset(theme, '\0', sizeof(struct expo_theme)); >>> CID 463144: (CHECKED_RETURN) >>> Calling "ofnode_read_u32" without checking return value (as is done= elsewhere 33 out of 41 times). 257 ofnode_read_u32(node, "font-size", &theme->font_size); 258 ofnode_read_u32(node, "menu-inset", &theme->menu_inset); 259 ofnode_read_u32(node, "menuitem-gap-y", &theme->menuitem_ga= p_y); 260 261 list_for_each_entry(scn, &exp->scene_head, sibling) { 262 ret =3D scene_apply_theme(scn, theme); /boot/expo.c: 258 in expo_apply_theme() 252 int ret; 253 254 log_debug("Applying theme %s\n", ofnode_get_name(node)); 255 256 memset(theme, '\0', sizeof(struct expo_theme)); 257 ofnode_read_u32(node, "font-size", &theme->font_size); >>> CID 463144: (CHECKED_RETURN) >>> Calling "ofnode_read_u32" without checking return value (as is done= elsewhere 33 out of 41 times). 258 ofnode_read_u32(node, "menu-inset", &theme->menu_inset); 259 ofnode_read_u32(node, "menuitem-gap-y", &theme->menuitem_ga= p_y); 260 261 list_for_each_entry(scn, &exp->scene_head, sibling) { 262 ret =3D scene_apply_theme(scn, theme); 263 if (ret) /boot/expo.c: 259 in expo_apply_theme() 253 254 log_debug("Applying theme %s\n", ofnode_get_name(node)); 255 256 memset(theme, '\0', sizeof(struct expo_theme)); 257 ofnode_read_u32(node, "font-size", &theme->font_size); 258 ofnode_read_u32(node, "menu-inset", &theme->menu_inset); >>> CID 463144: (CHECKED_RETURN) >>> Calling "ofnode_read_u32" without checking return value (as is done= elsewhere 33 out of 41 times). 259 ofnode_read_u32(node, "menuitem-gap-y", &theme->menuitem_ga= p_y); 260 261 list_for_each_entry(scn, &exp->scene_head, sibling) { 262 ret =3D scene_apply_theme(scn, theme); 263 if (ret) 264 return log_msg_ret("app", ret); 265 } 266 267 return 0; ** CID 463143: Control flow issues (DEADCODE) /test/dm/part.c: 124 in do_get_info_test() ___________________________________________________________________________= _____________________________ *** CID 463143: Control flow issues (DEADCODE) /test/dm/part.c: 124 in do_get_info_test() 118 119 memset(&p, 0, sizeof(p)); 120 121 ret =3D part_get_info_by_type(dev_desc, part, part_type, &p= ); 122 printf("part_get_info_by_type(%d, 0x%x) =3D %d\n", part, part_type, ret); 123 if (ut_assertok(ret)) { >>> CID 463143: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return 0;". 124 return 0; 125 } 126 127 ut_asserteq(reference->start, p.start); 128 ut_asserteq(reference->size, p.size); 129 ut_asserteq(reference->sys_ind, p.sys_ind); ___________________________________________________________________________= _____________________________ --nkwl5M91DKMfYlSI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTCq4oACgkQFHw5/5Y0 tyzkbAv/b4tnzWXYbyS3/zzcq0BcKkhKfpW1vsPp4TjsSohBkE6AZ/z3pRv/g3YB L066w+SauGDELR9/lQFSrrHya+aTYFKYdrNxNsx/9+dP5A2SeYdNyy4fM8+RDhTv Ogi2OT6F+DW7XdMVRksq++b6SAhK9Inrk/Ku7xT7GNoZrqYzqzegCQeB/kI97zSe C5pI7NQiTmzC2gmpPNE8PqKECNek1SDi/sSLGLqIiu1X0sJ/WVefaZgNrtFeRqYG pS45vxpbZYmKreKzTuZ4c8iuSGMLfI4TN50K7U6cA6jfpVGEks19FAKTEc5JfHqI CHyHD138Okak4JT8kjXjeFe5BbdYnzMPKexS8kGXXn8ORrMkAh4lNB7yjQRaqzHG nUYM5D4EMJeAkvu16SkNZbrY4ZhKMeTyqZF145LVAe8H4DYKORvP0pP7ZVWfxkBU xQZsoqneJa9W+NQMeml0u7J5Moe/IB9yYMtL3wNA/qZ2KCnR9HlR7yRJwacN6EaA DGVjQObe =Cz/u -----END PGP SIGNATURE----- --nkwl5M91DKMfYlSI--