Bug 1125393 - In some circumstances sudo consumes 100% CPU [NEEDINFO]
Summary: In some circumstances sudo consumes 100% CPU
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 6.7
Assignee: Daniel Kopeček
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1172231 1271982
TreeView+ depends on / blocked
 
Reported: 2014-07-31 18:09 UTC by hgraham
Modified: 2018-12-09 18:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-11 10:16:36 UTC
dkopecek: needinfo? (hgraham)


Attachments (Terms of Use)

Description hgraham 2014-07-31 18:09:03 UTC
Description of problem:
The customer has seen 2 occurrences now of a situation where a user will use sudo to su to a non-existent account and sudo will then consume all of the CPU. A stack trace of the PID shows an infinite loop taking place. 

The customer found the following bug report which according to him adheres very closely with the symptoms he experienced. 

http://www.sudo.ws/bugs/show_bug.cgi?id=631

I didn't see this bug fix included in the changelog and the link appears to be a newer version (1.8.9) than what we supply which is: sudo-1.8.6p3-12.el6.x86_64


Version-Release number of selected component (if applicable):
sudo-1.7.4p5-13.el6_3.x86_64

How reproducible:
The customer has been unable to reproduce using the same version of sudo that the occurrences took place in his testing 

Steps to Reproduce:
1.NA
2.
3.

Actual results:
"sudo su user" fails when changing to a non-existent user and 100% of the CPU is consumed, it is sporadic

Expected results:
the command fails but doesn't spike the CPU

Additional info:
I asked the customer for a stack trace but he was only able to supply the following so far since he is having trouble reproducing consistently

{fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, ...], 60, -398353341) = 20 ([...])
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, ...], 60, -398353341) = 20 ([...])
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, ...], 60, -398353341) = 20 ([...])
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=14, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=17, events=POLLIN}, {fd=18, events=POLLIN}, {fd=19, events=POLLIN}, {fd=20, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=30, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=34, events=POLLIN}, {fd=35, events=POLLIN}, ...], 60, -398353341^C <unfinished ...>
Process 29709 detached

Comment 5 Daniel Kopeček 2015-01-19 09:47:58 UTC
Hello,

(In reply to hgraham from comment #0)
> Description of problem:
> The customer has seen 2 occurrences now of a situation where a user will use
> sudo to su to a non-existent account and sudo will then consume all of the
> CPU. A stack trace of the PID shows an infinite loop taking place. 
> 
> The customer found the following bug report which according to him adheres
> very closely with the symptoms he experienced. 
> 
> http://www.sudo.ws/bugs/show_bug.cgi?id=631

I don't think that bug (and therefore the patch) is related to this BZ. The event loop was introduced in 1.8.9 and we don't have this version in RHEL 6.

> I didn't see this bug fix included in the changelog and the link appears to
> be a newer version (1.8.9) than what we supply which is:
> sudo-1.8.6p3-12.el6.x86_64
> 
> 
> Version-Release number of selected component (if applicable):
> sudo-1.7.4p5-13.el6_3.x86_64

Which one of the mentioned versions are we talking about? 1.7.4p5 or 1.8.6p3?

> How reproducible:
> The customer has been unable to reproduce using the same version of sudo
> that the occurrences took place in his testing 

So we don't have a good reproducer for this?

Comment 8 Daniel Kopeček 2016-02-11 10:16:36 UTC
Closing. No reproducer and no response.


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