[sudo-workers] 1.8.6p3 plugins/visudo and plugins/testsudoers segfault on FreeBSD-10 ia64 (Itanium)

Anton Shterenlikht mexas at bristol.ac.uk
Fri Dec 21 16:28:05 EST 2012


Hi

I'm using sudo on FreeBSD ia64 (Itanium) platform,
built from ports.
Up to and including sudo-1.8.5.p3 all seems fine.

I'm trying to upgrade to sudo 1.8.6p3, also
via FreeBSD ports, but get segfaults
in plugins/visudo and plugins/testsudoers.
This is on FreeBSD 10.0-CURRENT #0 r244182 ia64.

# svn up /usr/ports/security/sudo
Updating '.':
At revision 309371.
# cd /usr/ports/security/sudo
# svn diff
# make showconfig
===> The following configuration options are available for sudo-1.8.6.p3_1:
     AUDIT=off: Enable BSM audit support
     DISABLE_AUTH=off: Do not require authentication by default
     DISABLE_ROOT_SUDO=off: Do not allow root to run sudo
     INSULTS=off: Enable insults on failures
     LDAP=off: LDAP support
     NLS=off: Native Language Support
     NOARGS_SHELL=off: Run a shell if no arguments are given
     OPIE=off: Enable one-time passwords (no PAM support)
===> Use 'make config' to modify these settings
# 

make builds sudo seemingly with no problems,
the build log is here:
http://seis.bris.ac.uk/~mexas/sudo-1.8.5.p3-FreeBSD-10-ia64.build.log

Then this:

# make install
===>  Installing for sudo-1.8.6.p3_1
===>   Generating temporary packing list
===>  Checking if security/sudo already installed
if test -d ./.hg && cd .; then  if hg log --style=changelog -b default > ChangeLog.tmp; then  mv -f ChangeLog.tmp ChangeLog;  else  rm -f ChangeLog.tmp;  fi;  fi
for d in compat common  plugins/sudoers src include doc;  do (cd $d && exec make pre-install) && continue;  exit $?;  done
Checking existing sudoers file for syntax errors.
*** [pre-install] Signal 11

Stop in /usr/ports/security/sudo/work/sudo-1.8.6p3/plugins/sudoers.
*** [pre-install] Error code 1

Stop in /usr/ports/security/sudo/work/sudo-1.8.6p3.
*** [do-install] Error code 1

Stop in /usr/ports/security/sudo.
*** [install] Error code 1

Stop in /usr/ports/security/sudo.
# 

which indicates a problem in plugins/sudoers

# pwd
/usr/ports/security/sudo/work/sudo-1.8.6p3/plugins/sudoers
# make pre-install
Checking existing sudoers file for syntax errors.
*** [pre-install] Signal 11

Stop in /usr/ports/security/sudo/work/sudo-1.8.6p3/plugins/sudoers.
# 

digging further

# pr -n  Makefile |grep -C5 pre-install
  252		fi
  253	
  254	sudoers: $(srcdir)/sudoers.in
  255		(cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@)
  256	
  257	pre-install:
  258		@if test X"$(cross_compiling)" != X"yes" -a -r $(DESTDIR)$(sudoersdir)/sudoers; then \
  259		    echo "Checking existing sudoers file for syntax errors."; \
  260		    ./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \
  261		fi
  262	
# 

Finally I get to:

# pwd
/usr/ports/security/sudo/work/sudo-1.8.6p3/plugins/sudoers
# ./visudo
Segmentation fault (core dumped)
# ./testsudoers
usage: testsudoers [-dt] [-G sudoers_gid] [-g group] [-h host] [-p grfile] [-p pwfile] [-U sudoers_uid] [-u user] <user> <command> [args]
Segmentation fault (core dumped)
# 

# file visudo
visudo: ELF 64-bit LSB shared object, IA-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 10.0 (1000025), not stripped
# file testsudoers
testsudoers: ELF 64-bit LSB shared object, IA-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 10.0 (1000025), not stripped
# 

# gdb visudo visudo.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ia64-marcel-freebsd"...
Core was generated by `visudo'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) thread apply all bt

Thread 1 (process 100130):
#0  0x0000000000000000 in ?? ()
#1  0x2500000000036b00 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb) 


and the same for testsudoers:

# gdb testsudoers testsudoers.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ia64-marcel-freebsd"...
Core was generated by `testsudoers'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) thread apply all bt

Thread 1 (process 100102):
#0  0x0000000000000000 in ?? ()
#1  0x25000000402e32c0 in ?? ()
Previous frame identical to this frame (corrupt stack?)
(gdb) 


The FreeBSD sudo port maintainer
looked into this, but couldn't help.

Please advise

Thanks

Anton

PS. Please advise if sudo-users is a better list for this question.



More information about the sudo-workers mailing list