Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237375 - Segmentation fault in sudo.
Summary: Segmentation fault in sudo.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
Depends on:
Reported: 2008-09-10 21:30 UTC by Patrick Williams
Modified: 2008-11-13 03:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Patch for issue. (sudo-globsegv.diff,395 bytes, patch)
2008-09-10 21:31 UTC, Patrick Williams
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Williams 2008-09-10 21:30:45 UTC
I also reported this bug upstream:

When the /etc/sudoers file contains a glob entry with a large number of matches, running the 'sudo' executable causes a segmentation fault.

Reproducible: Always

Steps to Reproduce:
1. Add to sudoers file:
ALL ALL=(root) NOPASSWD: /usr/portage/*/*/
2. Run sudo as any user

(Noone would likely add /usr/portage/*/* to their sudoers file but this is a recreate case, not my original failure).
Actual Results:  
$ sudo
Segmentation fault

Expected Results:  
$ sudo
usage: sudo -h | -K | -k | -L | -l | -V | -v
usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
            {-i | -s | <command>}
usage: sudo -e [-S] [-p prompt] [-u username|#uid] file ...
Comment 1 Patrick Williams 2008-09-10 21:31:45 UTC
Created attachment 165177 [details, diff]
Patch for issue.

This patch fixes the segfault in sudo.
Comment 2 Wormo (RETIRED) gentoo-dev 2008-09-11 01:00:44 UTC
Thanks for the report, and especially for tracking down the problem!

Assigning to maintainer, who is currently "away" due to RL constraints but hopefully someone is helping him out.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-13 01:53:01 UTC
Hm I really missed this one out. I think I'll send an email upstream to see if they can release a new stable release with this fixed since they fixed it in a different version and would rather not diverge from their sources.

Closing UPSTREAM for now, I'll also consider unmasking 1.7.0_rc5 (which has this fixed already), but I wanted to fix the askpass problem first.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-13 03:08:44 UTC
I mailed upstream, he's going to release _p18 by end of this week, so I'll just wait for him (the fix for this is in there).

Thanks for reporting anyway :)