[RFC] PR 34481 arbitrary limit on decompressed size of .dwo files
Jan Beulich
jbeulich@suse.com
Tue Aug 25 07:05:31 GMT 2026
On 25.08.2026 07:14, Alan Modra wrote:
> PR34481 exposes a failure of a heuristic in bfd_section_size_insane
> dealing with compressed sections. The assumption there is that a
> compressed section would not be more than ten times the total file
> size. This of course is foolish since one highly compressed section
> can easily exceed ten times the total file size. However, it mostly
> worked for real object files. The claim in pr34481 is that the limit
> has been hit for .dwo files in a real C++ codebase. I don't find that
> claim unbelievable.
>
> While we could work around the .dwo problem with the following patch,
> I'm inclined to simply remove the whole "size / 10 > filesize" block.
>
> My reasoning is that this is anti-fuzzer code. If we allow a .dwo
> hole then the anti-fuzzer code may as well not be there. Fuzzers will
> soon find the hole.
>
> What do you all think?
I agree, fwiw. (I don't like such arbitrary limits anyway.)
Jan
More information about the Binutils
mailing list