Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

'su' and 'sudo' segfault after recent changes



Just built amd64-6.99.19 from sources of about 201305091400Z with the
result that 'su -c somecommand' immediately segfaults and
'sudo somecommand' executes the command, but segfaults on exit of the
command.

  $ su -c "ls"
  Password:
  Memory fault

  $ sudo ls
  [ output of 'ls' ]
  Memory fault

However, just starting a shell as root with 'su', 'su -', 'sudo -s' or
'sudo -i' works (although 'su -', 'sudo -s', and sudo -i' get a segfault
after the shell exits).

While operating as root, 'su -c somecommand' produces the expected
diagnostic:

  # su -c "ls"
  [1]   Segmentation fault (core dumped) su -c "ls"

and leaves behind a core file.  Loading into 'gdb' is inconclusive as
there are (almost) no symbols:

Core was generated by `su'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f7ff7805c03 in ?? ()
(gdb) bt
#0  0x00007f7ff7805c03 in ?? ()
#1  0x00007f7ff7c04878 in _rtld_shared_exit () from /usr/libexec/ld.elf_so
#2  0x00007f7ff7b150e8 in ?? ()
#3  0x00007f7ff7805b9f in ?? ()
#4  0x00007f7ff7ffa400 in ?? ()
#5  0x00007f7ff7b2a1a0 in ?? ()
#6  0x00007f7ff7b150e8 in ?? ()
#7  0x00007f7ff7805b9f in ?? ()
#8  0x0000000000000000 in ?? ()

I rebuilt 'sudo' with "CFLAGS+=-g", but it doesn't yield even that much
information:

Reading symbols from /usr/pkg/bin/sudo...done.
(gdb) run ls
Starting program: /usr/pkg/bin/sudo ls
.Xauthority     .kshrc          .profile        .ssh
.cshrc          .lesshst        .sh_history     .terminfo
.klogin         .login          .shrc           .terminfo.cdb

Program received signal SIGSEGV, Segmentation fault.
0x00007f7ff7405c03 in ?? ()
(gdb) bt
#0  0x00007f7ff7405c03 in ?? ()
#1  0x00007f7ff7ffa800 in ?? ()
#2  0x00007f7ff7b294a0 in ?? ()
#3  0x00007f7ff7b3e0e8 in ?? ()
#4  0x00007f7ff7405b9f in ?? ()
#5  0x0000000000000000 in ?? ()

This is a custom kernel, but I may not have DEBUG turned on.  I'll
rebuild and try again.

Also observed on macppc-6.99.19 as of 201305090000Z or so.

--
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index