RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1948657 - pam_sss_gss.so doesn't work with large kerberos tickets
Summary: pam_sss_gss.so doesn't work with large kerberos tickets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Alexey Tikhonov
QA Contact: shridhar
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks: 1949170
TreeView+ depends on / blocked
 
Reported: 2021-04-12 17:26 UTC by Alexey Tikhonov
Modified: 2021-11-10 09:11 UTC (History)
12 users (show)

Fixed In Version: sssd-2.5.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1949170 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:47:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5568 0 None closed pam_sss_gss.so doesn't work with large kerberos tickets 2021-04-12 17:30:03 UTC
Red Hat Product Errata RHBA-2021:4435 0 None None None 2021-11-09 19:47:40 UTC

Description Alexey Tikhonov 2021-04-12 17:26:27 UTC
(cloned from https://github.com/SSSD/sssd/issues/5568)

As discussed at https://lists.fedorahosted.org/archives/list/sssd-users@lists.fedorahosted.org/thread/GP3WO4WG54BCXLMI277MSLV5I5LFQU2G/ - when I try to use pam_sss_gss.so, it fails:
```
pam_sss_gss: Initializing GSSAPI authentication with SSSD
pam_sss_gss: Switching euid from 0 to 123456789
pam_sss_gss: Trying to establish security context
pam_sss_gss: SSSD User name: ...@example.net
pam_sss_gss: User domain: example.net
pam_sss_gss: User principal: ...@EXAMPLE.NET
pam_sss_gss: Target name: host.example.net
pam_sss_gss: Using ccache: FILE:/run/user/123456789/krb5cc
pam_sss_gss: Acquiring credentials for principal [...@EXAMPLE.NET]
pam_sss_gss: Communication error [3, 32]: Error in service module; Broken pipe
```

At the same time, sssd_pam logs:
```
(2021-04-01 10:55:00): [pam] [client_recv] (0x0400): Invalid data from client, closing connection!
```

The user is an AD user.

It looks like sssd_pam closes down the connection in `client_recv()` because `sss_packet_recv()` returns EINVAL, which it does if the request from the client is too large.

Maybe that's happening because the service ticket for host/myself.ipa.example.com is too large as it contains the PAC or whatever; using strace I can see the SSS_GSSAPI_SEC_CTX message being sent by the client is 1905 bytes long, but I think sssd_pam rejects requests larger than 1024 bytes (it reads the request into a 1536-byte buffer and then closes the connection rather than reading the rest).

Comment 1 Alexey Tikhonov 2021-04-12 17:30:07 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/5572

* `master`
    * b87619f9a917d6ed9ecdb5360c4bf242dce8e372 - responder/common/responder_packet: allow packets of max size
    * 5c9fa75bd0ffa02e31cbbf19ee68134ed384229a - responder/common/responder_packet: remove some unnecessary checks before growing packet
    * 37d331774385b2b871ba76fcdef6ceafd776efce - responder/common/responder_packet: further increase packet size for SSS_GSSAPI_SEC_CTX
    * 63f318f73c933dc2cb08cad2f911a52d2281c45b - responder/common/responder_packet: add debug logging to assist with errors caused by overlarge packets
    * c6a76283580c25ff78b36b8b23efdabbdb3a2cc1 - responder/common/responder_packet: reduce duplication of code that handles larger-than-normal packets
    * b6efe6b119b0c11314a324e8a2cf96fb74a9c983 - responder/common/responder_packet: handle large service tickets

Comment 20 errata-xmlrpc 2021-11-09 19:47:10 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 (sssd bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2021:4435


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