]> sourceware.org Git - newlib-cygwin.git/commit
Fix potential buffer overflow in makecontext trampoline
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 23 Jul 2015 18:25:22 +0000 (20:25 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 23 Jul 2015 18:25:22 +0000 (20:25 +0200)
commitbe8183701a4943d07bbc51d16952e9c02e7ef2c1
treef064b1d199adde81ab952d0a8e06e1e24444fb07
parent1e80973f288a6285f73b4565e7c4fcee12713b72
Fix potential buffer overflow in makecontext trampoline

glibc's tst-makecontext2 testcase uncovered a bug in
__cont_link_context.  If the function misses to reserve
shadow space for the calls to setcontext/cygwin_exit,
both functions could overwrite memory beyond the stack
configured in uc_stack.

        * exceptions.cc (__cont_link_context): x86_64: align stack and reserve
        shadow space for subsequent function calls, otherwise suffer potential
        buffer overflow.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/ChangeLog
winsup/cygwin/exceptions.cc
This page took 0.029485 seconds and 5 git commands to generate.