[PATCH v2 0/2] opcodes/nfp: bug fix for nfp disassembler

Alan Modra amodra@gmail.com
Wed Sep 1 01:24:58 GMT 2021


On Wed, Aug 25, 2021 at 09:01:16PM -0400, Yinjun Zhang wrote:
> This series is to fix some bugs in nfp disassembler.
> 
> Yinjun Zhang (2):
>   opcodes/nfp: add validity check of island and me

Thanks, I applied this one,

>   opcodes/nfp: skip those non-code sections

but won't apply this.  Disabling objdump -D is not a solution to bugs
found by fuzzers, because a very simple change to the attack object
will result in the same bug being exposed with objdump -d.  The whole
point of objdump -D is to disassemble non-code, knowing that it is
likely to result in nonsense.

By the way, you have another similar problem in init_nfp6000_mecsr_sec
with the menum calculation from a bit-field read from an object file.
That also needs to be sanity checked.  Bit-field values of 0 to 3 in
the file will result in out of bounds mecfgs array access.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list