[PATCH] [ARM] fix buffer overflow in gas
Jim Wilson
jim.wilson@linaro.org
Mon Oct 26 18:28:00 GMT 2015
On Ubuntu 14.04, I get
palantir:2062$ cat tmp.s
.cpu exynos-m1
palantir:2063$ ./as-new tmp.s
*** buffer overflow detected ***: ./as-new terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f984612538f]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f98461bcc9c]
/lib/x86_64-linux-gnu/libc.so.6(+0x109b60)[0x7f98461bbb60]
./as-new[0x42e227]
...
The problem is that the string "Samsung Exynos M1" is 18 characters
long including the trailing null byte, but the select_cpu_name array
is only 16 characters long. This patch increases it to 20 to make the
string fit and allow a little breathing room. Tested with a cross
build and make check.
Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.samsung.patch
Type: text/x-patch
Size: 612 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20151026/acee3399/attachment.bin>
More information about the Binutils
mailing list