Skip to contentSkip to conversation

New Defects reported by Coverity Scan for XenProject

DISCUSSION Jan Beulich 1 participant 1 message Sep 4, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 15 lines · On 04.09.2025 16:50, [email protected] wrote:

Hi,

Please find the latest report on new defect(s) introduced to XenProject found with Coverity Scan.

1 new defect(s) introduced to XenProject 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 1 of 1 defect(s)

** CID 1665214: Integer handling issues (INTEGER_OVERFLOW)
/tools/firmware/xen-dir/xen-root/xen/common/symbols.c: 123 in symbols_lookup()

Quoted 8 lines

_____________________________________________________________________________________________
*** CID 1665214: Integer handling issues (INTEGER_OVERFLOW)
/tools/firmware/xen-dir/xen-root/xen/common/symbols.c: 123 in symbols_lookup()
117 }
118
119 /* If we hit an END symbol, move to the previous (real) one. */
120 if (!symbols_names[get_symbol_offset(low)]) {
121 ASSERT(low);

With this I wonder ...

Quoted 4 lines

122 symbol_end = symbols_address(low);

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

CID 1665214: Integer handling issues (INTEGER_OVERFLOW)
Expression "--low", where "low" is known to be equal to 0, underflows the type of "--low", which is type "unsigned int".

123 --low;

... how "low" can be known to be zero when getting here. Without the assertion I would accept that the tool doesn't understand that an "end" symbol can't come first (albeit imo the report then would still be a false positive one).

Jan