Bug 1003567

Summary: large number of sudo rules results in error - Unable to create response: Invalid argument
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kurik <jkurik>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: apeetham, dpal, grajaiya, jgalipea, jhrozek, jkurik, lslebodn, mkolaja, mkosek, okos, pbrezina, pm-eus
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.9.2-82.10.el6_4 Doc Type: Bug Fix
Doc Text:
If a large amount of sudo rules with a combined size that exceeded 265 KB was configured on the system, due to the way the sss_packet_grow() function computed the total length of a response packet, SSSD failed with a "Unable to create response: Invalid argument" error message. With this update, the sss_package_grow() function code has been fixed to properly compute the response packet length, and SSSD no longer fails in the aforementioned scenario.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 08:57:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1002161    
Bug Blocks:    

Description Jan Kurik 2013-09-02 11:41:54 UTC
This bug has been copied from bug #1002161 and has been proposed
to be backported to 6.4 z-stream (EUS).

Comment 6 Amith 2013-09-11 11:07:05 UTC
Verified the bug on SSSD version: sssd-1.9.2-82.10.el6_4.x86_64

Steps followed during verification:

1. Created hundreds of different groups with an ldap user as member to all.

2. Assigned large sudo rules to all the groups, thereby associating the ldap user with numerous sudo rules.

3. Reproduced the bug with older build by executing "sudo -l". Got the following error message in sssd_sudo.log:

# cat /var/log/sssd/sssd_sudo.log | grep "Invalid argument"
(Wed Sep 11 16:08:14 2013) [sssd[sudo]] [sudosrv_cmd_send_reply] (0x0020): Unable to create response: Invalid argument
(Wed Sep 11 16:09:06 2013) [sssd[sudo]] [sudosrv_cmd_send_reply] (0x0020): Unable to create response: Invalid argument

Also, upon executing sudo -l, following error shows up:

# ssh -l sudo_test_user localhost
sudo_test_user@localhost's password: 
Last login: Wed Sep 11 15:42:10 2013 from localhost

-bash-4.1$ sudo -l
[sudo] password for sudo_test_user: 
User sudo_test_user is not allowed to run sudo on rhel-64.

4. Upgrade sssd to latest rpm and repeat the authentication part.

With the latest build, user is able to execute sudo commands successfully.

Comment 8 errata-xmlrpc 2013-09-19 08:57:52 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-1271.html