public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* glibc 2.32 rseq support incompatible with Firefox sandbox
@ 2020-07-09 15:03 Florian Weimer
  2020-07-09 15:19 ` H.J. Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Florian Weimer @ 2020-07-09 15:03 UTC (permalink / raw)
  To: Gian-Carlo Pascutto, mathieu.desnoyers
  Cc: Emilio Cobos Álvarez, Jed Davis, Christian Brauner, libc-alpha

I tried to run Firefox on current the current glibc development branch
which will become glibc 2.32 in early August.  It fails with SIGSYS
during rseq registration:

Core was generated by `/home/test/firefox/firefox-bin -contentproc -childID 6 -isForBrowser -prefsLen'.
Program terminated with signal SIGSYS, Bad system call.
#0 rseq_register_current_thread ()
at ../sysdeps/unix/sysv/linux/rseq-internal.h:38
38 if (INTERNAL_SYSCALL_ERROR_P (ret))
[Current thread is 1 (Thread 0x7f545a45e640 (LWP 5932))]
(gdb) l
33 if (__rseq_abi.cpu_id != RSEQ_CPU_ID_UNINITIALIZED)
34 __libc_fatal ("glibc fatal error: "
35 "rseq already initialized for this thread\n");
36 ret = INTERNAL_SYSCALL_CALL (rseq, &__rseq_abi, sizeof (struct rseq),
37 0, RSEQ_SIG);
38 if (INTERNAL_SYSCALL_ERROR_P (ret))
39 {
40 const char *msg = NULL;
41
42 switch (INTERNAL_SYSCALL_ERRNO (ret))

(gdb) bt
#0 rseq_register_current_thread ()
at ../sysdeps/unix/sysv/linux/rseq-internal.h:38
#1 start_thread (arg=<optimized out>) at pthread_create.c:390
#2 0x00007f546b86d283 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

This looks like the earlier dlopen problem because during the creation
of new threads, all signals are blocked. This is required for
correctness of the rseq implementation, so that applications cannot
observe a thread state during which rseq is not registered.

I filed a Firefox bug here:

  <https://bugzilla.mozilla.org/show_bug.cgi?id=1651701>

How can we work together to fix this?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-10  8:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 15:03 glibc 2.32 rseq support incompatible with Firefox sandbox Florian Weimer
2020-07-09 15:19 ` H.J. Lu
2020-07-09 15:29   ` Florian Weimer
2020-07-09 15:59 ` Mathieu Desnoyers
2020-07-09 16:34 ` Szabolcs Nagy
2020-07-09 18:10   ` Gian-Carlo Pascutto
2020-07-09 18:15     ` Florian Weimer
2020-07-10  3:16     ` Carlos O'Donell
2020-07-10  8:28       ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).