diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2018-05-05 18:08:27 -0700 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2018-05-05 18:08:27 -0700 |
commit | 0065aaaaae51cd60210ec3a7e13dddd8e01ffe2c (patch) | |
tree | fb1f587dbe38029797cdf5b3779b51b7cea3d680 /elf/Makefile | |
parent | b289cd9db8286fa6c670104dd5dfcfc68d5d00d6 (diff) | |
download | glibc-0065aaaaae51cd60210ec3a7e13dddd8e01ffe2c.zip glibc-0065aaaaae51cd60210ec3a7e13dddd8e01ffe2c.tar.gz glibc-0065aaaaae51cd60210ec3a7e13dddd8e01ffe2c.tar.bz2 |
Fix BZ 20419. A PT_NOTE in a binary could be arbitratily large, so using
alloca for it may cause stack overflow. If the note is larger than
__MAX_ALLOCA_CUTOFF, use dynamically allocated memory to read it in.
2018-05-05 Paul Pluzhnikov <ppluzhnikov@google.com>
[BZ #20419]
* elf/dl-load.c (open_verify): Fix stack overflow.
* elf/Makefile (tst-big-note): New test.
* elf/tst-big-note-lib.S: New.
* elf/tst-big-note.c: New.
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile index e658928..2dcd2b8 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -186,7 +186,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \ tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error tst-noload \ tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \ - tst-debug1 tst-main1 tst-absolute-sym + tst-debug1 tst-main1 tst-absolute-sym tst-big-note # reldep9 tests-internal += loadtest unload unload2 circleload1 \ neededtest neededtest2 neededtest3 neededtest4 \ @@ -272,7 +272,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \ tst-latepthreadmod $(tst-tls-many-dynamic-modules) \ tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \ - tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib + tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \ + tst-big-note-lib + ifeq (yes,$(have-mtls-dialect-gnu2)) tests += tst-gnu2-tls1 modules-names += tst-gnu2-tls1mod @@ -1450,3 +1452,5 @@ $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a tst-libc_dlvsym-static-ENV = \ LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so + +$(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so |