Bug <35058>: uint16_t overflow in ld/pdb.c calculate_symbols_size/parse_symbols

Jan Beulich jbeulich@suse.com
Fri Nov 27 08:46:05 GMT 2026


On 27.11.2026 03:33, 薛皓琳 wrote:
> I've reported a bug in ld/pdb.c that was not caught by the recent
> commit 147e60cae54 ("Fix potential integer overflows in ld/pdb.c"):
> 
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=35058
> 
> 
> The same uint16_t truncation pattern exists in calculate_symbols_size()
> and parse_symbols(). calculate_symbols_size() received no bounds check
> at all, and the "if (len > size)" check added to parse_symbols() does
> not trigger when len wraps to 0.
> 
> 
> PoC files and ASan output are attached to the bug report.

Would you mind sending a patch?

Jan


More information about the Binutils mailing list