This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1780] [i386] size of sigset_t in ucontext_t structure does not match linux kernel
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 14 Jun 2016 11:24:23 +0000
- Subject: [Bug libc/1780] [i386] size of sigset_t in ucontext_t structure does not match linux kernel
- Auto-submitted: auto-generated
- References: <bug-1780-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=1780
Szabolcs Nagy <nszabolcs at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nszabolcs at gmail dot com
--- Comment #9 from Szabolcs Nagy <nszabolcs at gmail dot com> ---
a better example is
sigfillset(&uc->uc_sigmask)
which must work on an uc passed to a signal handler,
but linux uc_sigmask is 8 bytes on i386 and glibc
writes 128 bytes so it clobbers the stack.
the only conforming fix is to wrap signal handlers
and translate kernel ucontext (since sigset_t is a
struct or int type that can be assigned), but a good
enough solution is to make all apis taking sigset_t*
argument to only access bytes that are relevant to
the linux kernel (in this case the first 8 bytes only).
--
You are receiving this mail because:
You are on the CC list for the bug.