Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
1 new defect(s) introduced to coreboot found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 1490493: (OVERFLOW_BEFORE_WIDEN)
/src/soc/intel/baytrail/northcluster.c: 85 in nc_read_resources()
/src/soc/intel/baytrail/northcluster.c: 84 in nc_read_resources()
________________________________________________________________________________________________________
*** CID 1490493: (OVERFLOW_BEFORE_WIDEN)
/src/soc/intel/baytrail/northcluster.c: 85 in nc_read_resources()
79 /* 0 -> 0xa0000 */
80 ram_from_to(dev, index++, 0, 0xa0000);
81
82 /* The SMMRR registers are 1MiB granularity with smmrrh being
83 * inclusive of the SMM region. */
84 smmrrl = (iosf_bunit_read(BUNIT_SMRRL) & 0xffff) * MiB;
>>> CID 1490493: (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "((iosf_bunit_read(47) & 0xffffU) + 1U) * 1048576U" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
85 smmrrh = ((iosf_bunit_read(BUNIT_SMRRH) & 0xffff) + 1) * MiB;
86
87 /* 0xc0000 -> smrrl - cacheable and usable */
88 ram_from_to(dev, index++, 0xc0000, smmrrl);
89
90 if (smmrrh > smmrrl)
/src/soc/intel/baytrail/northcluster.c: 84 in nc_read_resources()
78
79 /* 0 -> 0xa0000 */
80 ram_from_to(dev, index++, 0, 0xa0000);
81
82 /* The SMMRR registers are 1MiB granularity with smmrrh being
83 * inclusive of the SMM region. */
>>> CID 1490493: (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "(iosf_bunit_read(46) & 0xffffU) * 1048576U" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
84 smmrrl = (iosf_bunit_read(BUNIT_SMRRL) & 0xffff) * MiB;
85 smmrrh = ((iosf_bunit_read(BUNIT_SMRRH) & 0xffff) + 1) * MiB;
86
87 /* 0xc0000 -> smrrl - cacheable and usable */
88 ram_from_to(dev, index++, 0xc0000, smmrrl);
89
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P…
Hi everyone,
System Boot and Security Microconference will take place again at the
Linux Plumbers Conference this year. The CfP deadline (10th July) is
nearing...
If you have an interesting firmware/bootloader project focusing on a
specific aspect of "plumbing" in the Linux system, feel free to submit
proposals: https://lpc.events/event/16/abstracts/
More details about the Microconference and possible topics:
https://lpc.events/event/16/contributions/1157/
Best regards,
--
Michał Żygowski
Firmware Engineer
GPG: 6B5BA214D21FCEB2
https://3mdeb.com | @3mdeb_com