alpha-vms: ETIR checks
authorAlan Modra <amodra@gmail.com>
Mon, 1 Jun 2020 04:51:50 +0000 (14:21 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 1 Jun 2020 14:03:28 +0000 (23:33 +0930)
commit2fdb65f247379befd548a33ea185172968b9ebb9
treeadc90cec8f4d5c1b596aa7551852f73003f88ec8
parent3c3d03769e4d6fea4c8ee97bf36a2ca7d572461c
alpha-vms: ETIR checks

Better validity checks, and remove a fuzzer vulnerability of sorts that
targeted the store-immediate-repeat command with a zero length but
very large repeat counts to chew cpu.

* vms-alpha.c (_bfd_vms_slurp_etir): Check bound for the current
command against cmd_length, not the end of record.  For
ETIR__C_STO_IMMR check size against cmd_length, mask repeat count
to 32-bits and break out on zero size.  Add ETIR__C_STC_LP_PSB
cmd_length test.
bfd/ChangeLog
bfd/vms-alpha.c