[scan-admin at coverity.com: New Defects reported by Coverity Scan for Das U-Boot]

Tom Rini trini at konsulko.com
Wed May 26 18:58:08 CEST 2021


----- Forwarded message from scan-admin at coverity.com -----

Date: Tue, 25 May 2021 01:05:20 +0000 (UTC)
From: scan-admin at coverity.com
To: tom.rini at gmail.com
Subject: New Defects reported by Coverity Scan for Das U-Boot

Hi,

Please find the latest report on new defect(s) introduced to Das U-Boot found with Coverity Scan.

3 new defect(s) introduced to Das U-Boot found with Coverity Scan.
2 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 3 of 3 defect(s)


** CID 331856:  Uninitialized variables  (UNINIT)


________________________________________________________________________________________________________
*** CID 331856:  Uninitialized variables  (UNINIT)
/lib/efi_loader/efi_tcg2.c: 921 in create_specid_event()
915     	spec_event->spec_version_major =
916     		TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_MAJOR_TPM2;
917     	spec_event->spec_errata =
918     		TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_ERRATA_TPM2;
919     	spec_event->uintn_size = sizeof(efi_uintn_t) / sizeof(u32);
920     
>>>     CID 331856:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "supported" when calling "tpm2_get_pcr_info".
921     	err = tpm2_get_pcr_info(dev, &supported, &active,
922     				&spec_event->number_of_algorithms);
923     	if (err)
924     		goto out;
925     	if (spec_event->number_of_algorithms > MAX_HASH_COUNT ||
926     	    spec_event->number_of_algorithms < 1)

** CID 331855:  Uninitialized variables  (UNINIT)


________________________________________________________________________________________________________
*** CID 331855:  Uninitialized variables  (UNINIT)
/lib/efi_loader/efi_tcg2.c: 921 in create_specid_event()
915     	spec_event->spec_version_major =
916     		TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_MAJOR_TPM2;
917     	spec_event->spec_errata =
918     		TCG_EFI_SPEC_ID_EVENT_SPEC_VERSION_ERRATA_TPM2;
919     	spec_event->uintn_size = sizeof(efi_uintn_t) / sizeof(u32);
920     
>>>     CID 331855:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "active" when calling "tpm2_get_pcr_info".
921     	err = tpm2_get_pcr_info(dev, &supported, &active,
922     				&spec_event->number_of_algorithms);
923     	if (err)
924     		goto out;
925     	if (spec_event->number_of_algorithms > MAX_HASH_COUNT ||
926     	    spec_event->number_of_algorithms < 1)

** CID 331854:  Control flow issues  (NO_EFFECT)
/lib/efi_loader/efi_tcg2.c: 752 in efi_tcg2_hash_log_extend_event()


________________________________________________________________________________________________________
*** CID 331854:  Control flow issues  (NO_EFFECT)
/lib/efi_loader/efi_tcg2.c: 752 in efi_tcg2_hash_log_extend_event()
746     	if (efi_tcg_event->size < efi_tcg_event->header.header_size +
747     	    sizeof(u32)) {
748     		ret = EFI_INVALID_PARAMETER;
749     		goto out;
750     	}
751     
>>>     CID 331854:  Control flow issues  (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true. "efi_tcg_event->header.pcr_index < 0U".
752     	if (efi_tcg_event->header.pcr_index < 0 ||
753     	    efi_tcg_event->header.pcr_index > TPM2_MAX_PCRS) {
754     		ret = EFI_INVALID_PARAMETER;
755     		goto out;
756     	}
757     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoA22WlOQ-2By3ieUvdbKmOyw68TMVT4Kip-2BBzfOGWXJ5yIiYplmPF9KAnKIja4Zd7tU-3DH9_4_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTuOTF5O38i4jL-2BD-2FsmrMh2lPzvREHBhqI8vCJ-2BIP-2FXhAJ3irlT-2FJk2sTfzSE0n6yvc5mZv-2F1TXb3F0Ev-2FdreWwRhxjJoa-2FPZBEnX6yBmc80HGnkfFCmBlGixi3NDktrXT0unG8R8-2B-2BMnfJ5ZEf2wap1no4QCXizq5T9klMZiXxyjw-3D-3D

  To manage Coverity Scan email notifications for "tom.rini at gmail.com", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxWeIHzDeopm-2BEWQ6S6K-2FtUHv9ZTk8qZbuzkkz9sa-2BJFw4elYDyedRVZOC-2ButxjBZdouVmTGuWB6Aj6G7lm7t25-2Biv1B-2B9082pHzCCex2kqMs-3DrJM5_EEm8SbLgSDsaDZif-2Bv7ch8WqhKpLoKErHi4nXpwDNTuOTF5O38i4jL-2BD-2FsmrMh2lCbMtreDazwi5HIVw-2FInsq1UjQPSekFOErjT207tnNVPyexr3egGBVAo2ZA7Ge-2Fl7I3INbrgnTuXLIb-2FaWaodarJVao56-2BJxiYKJP-2B-2F-2FDlnIXZgenQkkpFLZvmZ4cmX1xLH9fbJ713T6bqjKF-2Fjt7HQ-3D-3D


----- End forwarded message -----

-- 
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/20210526/cb20d29f/attachment.sig>


More information about the U-Boot mailing list