diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-11-17 16:04:29 -0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-11-17 16:04:29 -0200 |
commit | 83d6db8187448059528d9a0736d929840291de34 (patch) | |
tree | e455a65093f333e3bd3baff1bf832728937327f0 /NEWS | |
parent | bc7cdeb7f017178e927d6d6ed5374b63758acadf (diff) | |
download | glibc-83d6db8187448059528d9a0736d929840291de34.zip glibc-83d6db8187448059528d9a0736d929840291de34.tar.gz glibc-83d6db8187448059528d9a0736d929840291de34.tar.bz2 |
i386: Fix i386 sigaction sa_restorer initialization (BZ#21269)
This patch fixes the i386 sa_restorer field initialization for sigaction
syscall for kernel with vDSO. As described in bug report, i386 Linux
(and compat on x86_64) interprets SA_RESTORER clear with nonzero
sa_restorer as a request for stack switching if the SS segment is 'funny'.
This means that anything that tries to mix glibc's signal handling with
segmentation (for instance through modify_ldt syscall) is randomly broken
depending on what values lands in sa_restorer.
The testcase added is based on Linux test tools/testing/selftests/x86/ldt_gdt.c,
more specifically in do_multicpu_tests function. The main changes are:
- C11 atomics instead of plain access.
- Remove x86_64 support which simplifies the syscall handling and fallbacks.
- Replicate only the test required to trigger the issue.
Checked on i686-linux-gnu.
[BZ #21269]
* sysdeps/unix/sysv/linux/i386/Makefile (tests): Add tst-bz21269.
* sysdeps/unix/sysv/linux/i386/sigaction.c (SET_SA_RESTORER): Clear
sa_restorer for vDSO case.
* sysdeps/unix/sysv/linux/i386/tst-bz21269.c: New file.
(cherry picked from commit 68448be208ee06e76665918b37b0a57e3e00c8b4)
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -11,6 +11,7 @@ The following bugs are resolved with this release: [6889] 'PWD' mentioned but not specified [16335] Feature test macro documentation incomplete and out of date + [21269] i386 sigaction sa_restorer handling is wrong [22342] NSCD not properly caching netgroup [22638] sparc: static binaries are broken if glibc is built by gcc configured with --enable-default-pie |