This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/9893] New: LD_AUDIT - misaligned _dl_call_pltexit parameter causing crash in audit library

The outregs parameter (struct La_x86_64_retval pointer) of _dl_call_pltexit
function is not aligned to 16. This is causing crash in the audit library.

When the audit library touches the lrv_xmm0 (or lrv_xmm1) member of the 
La_x86_64_retval, gcc will emit 'movaps' instructions which expect a
parameter aligned to 16, otherwise it segfaults.

In email discussion H.J. Lu mentioned: "According to x86-64 psABI,
La_x86_64_retval  should be aligned at 16byte"

The issue can be reproduced by using attached audit.c as the audit library.

Here is the gdb session record showing the issue:

> ...
> (gdb) b _dl_call_pltexit
> Function "_dl_call_pltexit" not defined.
> Make breakpoint pending on future shared library load? (y or [n]) y
> Breakpoint 1 (_dl_call_pltexit) pending.
> (gdb) r
> Starting program: /opt/crash
> symbol __libc_start_main
> symbol printf
> Breakpoint 1, _dl_call_pltexit (l=0x7ffff7ffd000, reloc_offset=0,
> inregs=0x7fffffffe418, outregs=0x7fffffffe3c8) at dl-runtime.c:408
> 408     {
> (gdb)

           Summary: LD_AUDIT - misaligned _dl_call_pltexit parameter causing
                    crash in audit library
           Product: glibc
           Version: 2.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: olsajiri at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-*-linux-gnu
  GCC host triplet: x86_64-*-linux-gnu
GCC target triplet: x86_64-*-linux-gnu

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]