distribution icon indicating copy to clipboard operation
distribution copied to clipboard

/usr/bin/id from coreutils segfaults with sssd

Open apr456 opened this issue 2 years ago • 1 comments

When using sssd to resolve users, /usr/bin/id utility (from coreutils) segfaults:

id[248568]: segfault at 0 ip 00007f1778538fa4 sp 00007ffdc91925d0 error 4 in libnss_sss.so.2[7f1778538000+7000]

Segfault occurs on access to thread local variable in libnss_sss.so. As coreutils are statically linked, looks like they don't support loading DSO with thread local storage.

gdb output (with debuginfo): Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f1778538fa4 in sss_cli_check_socket (errnop=errnop@entry=0x1c7d3b0, socket_name=socket_name@entry=0x7f1778540010 "/var/lib/sss/pipes/nss", timeout=timeout@entry=300000) at src/sss_client/common.c:672 672 ret = fstat(sss_cli_sd, &mysb);

Disassemble: 0x00007f1778538f8a <+1434>: nopw 0x0(%rax,%rax,1) 0x00007f1778538f90 <+1440>: lea 0xf039(%rip),%rdi # 0x7f1778547fd0 0x00007f1778538f97 <+1447>: call 0x7f1778538170 __tls_get_addr@plt 0x00007f1778538f9c <+1452>: lea 0x60(%rsp),%rbp 0x00007f1778538fa1 <+1457>: mov %rbp,%rsi => 0x00007f1778538fa4 <+1460>: mov 0x0(%rax),%edi

Clearlinux release: 39150 /etc/nsswitch: passwd: files altfiles sss

apr456 avatar May 19 '23 10:05 apr456

hmm ok. unlike most of coreutils, id as static is not as critical for recovery I'll make id to be not static for the next build

thanks for the report!

On Fri, May 19, 2023 at 3:19 AM apr456 @.***> wrote:

When using sssd to resolve users, /usr/bin/id utility (from coreutils) segfaults:

id[248568]: segfault at 0 ip 00007f1778538fa4 sp 00007ffdc91925d0 error 4 in libnss_sss.so.2[7f1778538000+7000]

Segfault occurs on access to thread local variable in libnss_sss.so. As coreutils are statically linked, looks like they don't support loading DSO with thread local storage.

gdb output (with debuginfo): Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f1778538fa4 in sss_cli_check_socket @.=0x1c7d3b0, @.=0x7f1778540010 "/var/lib/sss/pipes/nss", @.***=300000) at src/sss_client/common.c:672 672 ret = fstat(sss_cli_sd, &mysb);

Disassemble: 0x00007f1778538f8a <+1434>: nopw 0x0(%rax,%rax,1) 0x00007f1778538f90 <+1440>: lea 0xf039(%rip),%rdi # 0x7f1778547fd0 0x00007f1778538f97 <+1447>: call 0x7f1778538170 @.*** 0x00007f1778538f9c <+1452>: lea 0x60(%rsp),%rbp 0x00007f1778538fa1 <+1457>: mov %rbp,%rsi => 0x00007f1778538fa4 <+1460>: mov 0x0(%rax),%edi

Clearlinux release: 39150 /etc/nsswitch: passwd: files altfiles sss

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/2896, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FOSZAZOZXBHQOMZTATXG5CMLANCNFSM6AAAAAAYHS37U4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fenrus75 avatar May 19 '23 16:05 fenrus75