diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-22 02:43:39 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-22 02:43:39 +0200 |
commit | 444eacba82f675d4657ad55da67b355536be90ab (patch) | |
tree | a717e57ed96af770fa5903758b2c046bf8c7eb11 /sysdeps/mach/i386/syscall.S | |
parent | e67f54ab1a6253dd69cb2c770d785c7eb6d2172c (diff) | |
download | glibc-444eacba82f675d4657ad55da67b355536be90ab.tar.gz glibc-444eacba82f675d4657ad55da67b355536be90ab.tar.xz glibc-444eacba82f675d4657ad55da67b355536be90ab.zip |
hurd: Fix stack pointer corruption in syscall
Thanks Justus Winter for the report. * sysdeps/mach/i386/syscall.S (syscall): Push back syscall number.
Diffstat (limited to 'sysdeps/mach/i386/syscall.S')
-rw-r--r-- | sysdeps/mach/i386/syscall.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/mach/i386/syscall.S b/sysdeps/mach/i386/syscall.S index adb7716948..643cddc9ba 100644 --- a/sysdeps/mach/i386/syscall.S +++ b/sysdeps/mach/i386/syscall.S @@ -22,5 +22,8 @@ ENTRY (syscall) popl %eax /* Pop syscall number into %eax. */ pushl %ecx /* Push back return address. */ .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- gas bug */ + popl %ecx /* Pop return address into %ecx. */ + pushl $0 /* Push back dumb syscall number. */ + pushl %ecx /* Push back return address. */ ret END (syscall) |