New Defects reported by Coverity Scan for Das U-Boot
Hey all,
Here's the latest report.
---------- Forwarded message ---------
From: <[email protected]>
Date: Sun, Nov 23, 2025 at 12:28 PM
Subject: New Defects reported by Coverity Scan for Das U-Boot
To: <[email protected]>
Hi,
Please find the latest report on new defect(s) introduced to *Das U-Boot* found with Coverity Scan.
- *New Defects Found:* 3
- 2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
- *Defects Shown:* Showing 3 of 3 defect(s)
Defect Details
** CID 639130: (CHECKED_RETURN)
/test/cmd/bdinfo.c: 166 in bdinfo_test_all() /test/cmd/bdinfo.c: 164 in bdinfo_test_all() /test/cmd/bdinfo.c: 165 in bdinfo_test_all()
_____________________________________________________________________________________________
*** CID 639130: (CHECKED_RETURN)
/test/cmd/bdinfo.c: 166 in bdinfo_test_all()
160
161 ut_assertok(bdinfo_check_mem(uts));
162
163 /* CONFIG_SYS_HAS_SRAM testing not supported */
164 ut_check_console_linen(uts, "flashstart");
165 ut_check_console_linen(uts, "flashsize");
>>> CID 639130: (CHECKED_RETURN)
>>> Calling "ut_check_console_linen" without checking return value (as is done elsewhere 166 out of 169 times).
166 ut_check_console_linen(uts, "flashoffset");
167 ut_assert_nextline("baudrate = %lu bps",
168 env_get_ulong("baudrate", 10, 1234));
169 ut_assertok(test_num_l(uts, "relocaddr", gd->relocaddr));
170 ut_assertok(test_num_l(uts, "reloc off", gd->reloc_off));
171 ut_assert_nextline("%-12s= %u-bit", "Build", (uint)sizeof(void *) * 8);/test/cmd/bdinfo.c: 164 in bdinfo_test_all()
158 {
159 ut_assertok(test_num_l(uts, "boot_params", 0));
160
161 ut_assertok(bdinfo_check_mem(uts));
162
163 /* CONFIG_SYS_HAS_SRAM testing not supported */
>>> CID 639130: (CHECKED_RETURN)
>>> Calling "ut_check_console_linen" without checking return value (as is done elsewhere 166 out of 169 times).
164 ut_check_console_linen(uts, "flashstart");
165 ut_check_console_linen(uts, "flashsize");
166 ut_check_console_linen(uts, "flashoffset");
167 ut_assert_nextline("baudrate = %lu bps",
168 env_get_ulong("baudrate", 10, 1234));
169 ut_assertok(test_num_l(uts, "relocaddr", gd->relocaddr));/test/cmd/bdinfo.c: 165 in bdinfo_test_all()
159 ut_assertok(test_num_l(uts, "boot_params", 0));
160
161 ut_assertok(bdinfo_check_mem(uts));
162
163 /* CONFIG_SYS_HAS_SRAM testing not supported */
164 ut_check_console_linen(uts, "flashstart");
>>> CID 639130: (CHECKED_RETURN)
>>> Calling "ut_check_console_linen" without checking return value (as is done elsewhere 166 out of 169 times).
165 ut_check_console_linen(uts, "flashsize");
166 ut_check_console_linen(uts, "flashoffset");
167 ut_assert_nextline("baudrate = %lu bps",
168 env_get_ulong("baudrate", 10, 1234));
169 ut_assertok(test_num_l(uts, "relocaddr", gd->relocaddr));
170 ut_assertok(test_num_l(uts, "reloc off", gd->reloc_off));** CID 639129: Memory - illegal accesses (BUFFER_SIZE)
/drivers/clk/clk_scmi.c: 191 in scmi_clk_get_ctrl_flags()
_____________________________________________________________________________________________
*** CID 639129: Memory - illegal accesses (BUFFER_SIZE)
/drivers/clk/clk_scmi.c: 191 in scmi_clk_get_ctrl_flags()
185 char name[SCMI_CLOCK_NAME_LENGTH_MAX]; 186 ret = scmi_clk_get_attibute(dev, clk->id & CLK_ID_MSK, 187 name, &attributes); 188 if (ret) 189 return ret;
190
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CID 639129: Memory - illegal accesses (
BUFFER_SIZE)
Calling "strncpy" with a maximum size argument of 16 bytes on destination array "clkscmi->name" of size 16 bytes might leave the destination string unterminated.
191 strncpy(clkscmi->name, name, SCMI_CLOCK_NAME_LENGTH_MAX);
192 if (CLK_HAS_RESTRICTIONS(attributes)) {
193 u32 perm;194
195 ret = scmi_clk_get_permissions(dev, clk->id & CLK_ID_MSK, &perm);
196 if (ret < 0)
** CID 639128: Resource leaks (RESOURCE_LEAK)
/drivers/clk/clk_scmi.c: 373 in scmi_clk_probe()
_____________________________________________________________________________________________
*** CID 639128: Resource leaks (RESOURCE_LEAK)
/drivers/clk/clk_scmi.c: 373 in scmi_clk_probe()
367 return ret;
368
369 dev_clk_dm(dev, i, &clk_scmi->clk); 370 dev_set_parent_priv(clk_scmi->clk.dev, priv); 371 }
372
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CID 639128: Resource leaks (
RESOURCE_LEAK)
Variable "clk_scmi_bulk" going out of scope leaks the storage it points to.
373 return 0;
374 }
375
376 static int __scmi_clk_set_parent(struct clk *clk, struct clk *parent)
377 {
378 struct scmi_clk_parent_set_in in = {View Defects in Coverity Scan
<https://scan.coverity.com/projects/das-u-boot?tab=overview>
Best regards,
The Coverity Scan Admin Team
----- End forwarded message -----
Signature · 1 line
Tom