Bug 903020 - sudoers containing specially crafted aliases causes segfault of visudo
sudoers containing specially crafted aliases causes segfault of visudo
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Daniel Kopeček
Aleš Mareček
: Regression
Depends On:
Blocks: 905536
  Show dependency treegraph
Reported: 2013-01-22 18:17 EST by Aleš Mareček
Modified: 2013-02-21 04:45 EST (History)
4 users (show)

See Also:
Fixed In Version: sudo-1.8.6p3-7.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-21 04:45:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (825 bytes, patch)
2013-01-23 06:45 EST, Daniel Kopeček
no flags Details | Diff

  None (edit)
Description Aleš Mareček 2013-01-22 18:17:41 EST
Description of problem:
Sudoers file containing specially crafted aliases causes segfault of visudo.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cat <<EOF >>/etc/sudoers
User_Alias YYY = FOO
User_Alias XXX = nobody
User_Alias FOO = XXX,YYY
2. visudo -c
3. echo $?
Actual results:
2. visudo: Warning: cycle in User_Alias `FOO'
Segmentation fault (core dumped)
3. 139

Expected results:
No segfault, works

Additional info:
If you insert these aliases with "visudo" it will segfault and changes won't store. Unfortunatelly when you store this arbitrary code by some other tool (vim, cat, ...) you won't be able to delete it with visudo because of segfault.
Comment 2 Daniel Kopeček 2013-01-23 06:01:47 EST
This should be easily fixable. I'll try to prepare a patch ASAP.
Comment 3 Daniel Kopeček 2013-01-23 06:45:11 EST
Created attachment 685835 [details]
proposed patch
Comment 5 Daniel Kopeček 2013-01-23 08:23:10 EST
Upstream reply:

Comment 13 errata-xmlrpc 2013-02-21 04:45:14 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.