]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
alpha_ecoff_get_relocated_section_contents buffer overflow
authorAlan Modra <amodra@gmail.com>
Tue, 5 Dec 2023 06:02:34 +0000 (16:32 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 5 Dec 2023 07:50:51 +0000 (18:20 +1030)
commitdb4ab410dec3554bf38f69879de2306ce5e25b7e
tree247c49ec4664f65be5d3743b4fef84f023081374
parent1024d59cb2478887bb778d68d49ccf95fc7d5a26
alpha_ecoff_get_relocated_section_contents buffer overflow

This is aimed at fixing holes in two alpha-ecoff relocation functions
that access section contents without first bounds checking offsets.
I've also rewritten ALPHA_R_OP_STORE handling to support writing to
the bytes near the end of the section.

* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
bother checking ALPHA_R_LITERAL insn.  Range check before reading
contents for ALPHA_R_GPDISP, and simplify handling.  Rewrite
ALPHA_R_OP_STORE handling.  Correct error callback args.
(alpha_relocate_section): Similarly.  Don't abort, report errors.
bfd/coff-alpha.c