Bug 36 - segfault if hostname mis configured
segfault if hostname mis configured
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.3
PC Linux
: normal normal
Assigned To: Todd C. Miller
http://bugs.debian.org/86062
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-12 17:28 MDT by Bdale Garbee
Modified: 2001-12-12 22:27 MST (History)
0 users

See Also:


Attachments
diff to force bug to show up (1.49 KB, patch)
2001-12-12 16:31 MST, Len Lattanzi
Details | Diff
my fix to avoid crash in log_error when sending email (1.96 KB, patch)
2001-12-12 16:33 MST, Len Lattanzi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bdale Garbee 2001-04-12 17:28:59 MDT
There have been persistent, sporadic reports from users of my Debian GNU/Linux
sudo packages that sudo segfaults if the 'hostname' is set wrong, resulting in a
gethostbyname failure.

Fumitoshi UKAI <ukai@debian.or.jp> has submitted a patch which he claims
resolves this problem, which is available for your review at the attached URL.

It'd be good to have this fixed in a future release.
Comment 1 Todd C. Miller 2001-04-12 17:55:59 MDT
I fixed this a while ago in my source tree so sudo 1.6.4 will have this fixed.
Comment 2 Len Lattanzi 2001-12-12 16:24:59 MST
This bug is still reproducible in CVS sources as of 2001-Dec-12
To reproduce do something like
user_host = "IdonotExist";
just before gethostbyname in set_fqdn() and configure --with-fqdn
Fix is to move sudo_user.pw initialization before set_fqdn and its call
to log_error.
Send e-mail if you want the diffs, bugzilla is not letting me attach them.
Comment 3 Len Lattanzi 2001-12-12 16:31:59 MST
Created attachment 6 [details]
diff to force bug to show up
Comment 4 Len Lattanzi 2001-12-12 16:33:59 MST
Created attachment 7 [details]
my fix to avoid crash in log_error when sending email
Comment 5 Todd C. Miller 2001-12-12 18:27:59 MST
Hmm, I thought I had fixed that but apparently not.  I just committed a fix to the cvs tree to defer
the call to set_fqdn() until after log_error() is safe.  Thanks for re-opening this.