public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nnye at whitebeamsec dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/28366] New: Calling name() on a locale object (std::locale) with LD_AUDIT library loaded results in SIGSEGV
Date: Tue, 21 Sep 2021 21:51:30 +0000	[thread overview]
Message-ID: <bug-28366-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28366

            Bug ID: 28366
           Summary: Calling name() on a locale object (std::locale) with
                    LD_AUDIT library loaded results in SIGSEGV
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: nnye at whitebeamsec dot com
  Target Milestone: ---

A bug is preventing CLI utilities such as apt from being profiled via LD_AUDIT:

$ cat auditmin.c # Minimal LD_AUDIT library
unsigned int la_version(unsigned int version) { return version; }
$ gcc -shared -fPIC auditmin.c -o auditmin.so

$ cat crasher.cpp
#include<locale>
int main { std::locale("").name(); }
$ g++ crasher.cpp -o crasher

Without LD_AUDIT loaded (works as intended):
$ ./crasher
$

With LD_AUDIT loaded:
$ LD_AUDIT=$PWD/auditmin.so ./crasher
Segmentation fault (core dumped)
$

gdb reports the issue occurs in std::locale::name in locale.cc (L133).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-09-21 21:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 21:51 nnye at whitebeamsec dot com [this message]
2021-09-22 10:12 ` [Bug dynamic-link/28366] " fweimer at redhat dot com
2021-09-22 20:10 ` nnye at whitebeamsec dot com
2021-09-22 20:13 ` [Bug dynamic-link/28366] Calling name() on a locale object (std::locale) with LD_AUDIT library loaded results in SIGSEGV on aarch64 platforms nnye at whitebeamsec dot com
2021-09-22 20:16 ` nnye at whitebeamsec dot com
2021-10-05 21:24 ` woodard at redhat dot com
2021-10-06 18:29 ` adhemerval.zanella at linaro dot org
2021-10-07 15:40 ` nnye at whitebeamsec dot com
2021-10-07 19:03 ` adhemerval.zanella at linaro dot org
2021-10-08  1:09 ` nnye at whitebeamsec dot com
2021-10-08  1:11 ` nnye at whitebeamsec dot com
2022-03-25 16:33 ` nsz at gcc dot gnu.org
2022-03-25 16:40 ` nsz at gcc dot gnu.org

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=bug-28366-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).