public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-help <libc-help@sourceware.org>
Subject: Re: segmentation fault with glibc-2.34
Date: Fri, 03 Dec 2021 16:02:24 +0100	[thread overview]
Message-ID: <8735n9ybnj.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAMXh4bVBP5EU+1Zi4fK+=GHr0Miytjb-_J3+336t8i=J+TnL2A@mail.gmail.com> (Adhemerval Zanella via Libc-help's message of "Fri, 3 Dec 2021 11:55:12 -0300")

* Adhemerval Zanella via Libc-help:

> On Fri, Dec 3, 2021 at 10:38 AM Andreas Fink via Libc-help
> <libc-help@sourceware.org> wrote:
>>
>> Hello,
>> I have observed a crash in firefox with glibc-2.34 and have found a
>> small reproducer.
>> Is the sigsys signal handler valid? If yes, then there is a bug in
>> glibc-2.34.
>> If it is invalid to set the result in the context, I think the firefox
>> sandbox is doing dodgy things.
>>
>> gcc test.c -lseccomp
>> strace ./a.out
>
> The seccomp filter *explicitly* blocks newfstatat, which might be used
> by getpwuid.

It's used by the chroot detection.  NSS assumes that a chroot has
happened and disables module loading.  This produces internal null
pointers despite returning success from the lookup, and the callers do
not handle that.  I'm not sure how the previous code handled that.

We should probably return EPERM due to that failing stat call and
propagate the failure to the caller.  Returning ENOENT/a successful
lookup that produces no data seems wrong.

Thanks,
Florian


  reply	other threads:[~2021-12-03 15:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 13:38 Andreas Fink
2021-12-03 14:55 ` Adhemerval Zanella
2021-12-03 15:02   ` Florian Weimer [this message]
2021-12-03 15:15     ` Adhemerval Zanella
2021-12-03 15:03   ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735n9ybnj.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).