<div style="font-size: 14.6667px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei";" data-mail-from="wemail-pc"><div id="wemail_placeholder_space"><div></div></div>Hi,<div><br></div><div>I've reported a bug in ld/pdb.c that was not caught by the recent</div><div>commit 147e60cae54 ("Fix potential integer overflows in ld/pdb.c"):</div><div><br></div><div>  <a insert-link="true" draggable="false" href="https://sourceware.org/bugzilla/show_bug.cgi?id=" data-simple-link="true" data-plugin-urltype="default" style="color: rgb(38, 126, 240);text-decoration: none; outline: none;display: inline; cursor: pointer; text-decoration: underline; color: rgb(38, 126, 240);">https://sourceware.org/bugzilla/show_bug.cgi?id=</a>35058</div><div><br></div><div>The same uint16_t truncation pattern exists in calculate_symbols_size()</div><div>and parse_symbols(). calculate_symbols_size() received no bounds check</div><div>at all, and the "if (len > size)" check added to parse_symbols() does</div><div>not trigger when len wraps to 0.</div><div><br></div><div>PoC files and ASan output are attached to the bug report.</div><div><br></div>Reporter: Haolin Xue<xuehaolin@uniontech.com><div class="qqmail_sign" id="wemailsigcontent" signid="200"><div class="rich_custom_signature"><div><p></p><br></div></div><br><div><br></div><div><br></div></div><div></div></div>