Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 917007

Summary: FAMPending() can crash due to fd_set overflow
Product: Red Hat Enterprise Linux 5 Reporter: Luke Elliott <lukester_null>
Component: gaminAssignee: Ondrej Holy <oholy>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.9CC: lukester_null
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 13:19:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use poll() instead of select(). none

Description Luke Elliott 2013-03-01 12:35:48 UTC
Created attachment 704152 [details]
Use poll() instead of select().

Description of problem:

gamin_data_available() uses select() with a single fd. If the value of the fd is >= FD_SETSIZE, nasty things happen.


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

0.1.7-10, though the same problem exists in Fedora's 0.1.10-13 (and RHEL6).


How reproducible:

Always.

Steps to Reproduce:
1. Have more than FD_SETSIZE file descriptors open before FAMOpen()
2. FAMOpen()
3. FAMPending()


Actual results:

Undefined behaviour (SIGBUS, SIGSEG, ...).


Expected results:

Don't crash.


Additional info:

Use poll() instead? Trivial patch attached.

Comment 1 RHEL Program Management 2014-03-07 12:49:16 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 2 RHEL Program Management 2014-06-02 13:19:03 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).