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 2034800 - 4.10.16-17 regression for idmap_nss due to missing patch
Summary: 4.10.16-17 regression for idmap_nss due to missing patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Denis Karpelevich
URL:
Whiteboard:
: 2041047 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-22 08:04 UTC by Rik Theys
Modified: 2022-01-31 16:56 UTC (History)
10 users (show)

Fixed In Version: samba-4.10.16-18.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-31 16:55:55 UTC
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-106390 0 None None None 2021-12-22 08:10:44 UTC
Red Hat Issue Tracker SSSD-4246 0 None None None 2022-01-10 14:07:38 UTC
Samba Project 14901 0 None None None 2022-01-10 13:27:12 UTC

Description Rik Theys 2021-12-22 08:04:32 UTC
Description of problem:

With the update to 4.10.16-17, our configuration no longer works as the patches included in the update seem to be incomplete.

We use idmap_nss and our authentication no longer works after the update as our DOMAIN\user accounts are no longer mapped to 'user'.

This is discussed in https://www.samba.org/samba/security/CVE-2020-25717.html.

A workaround would be to use a user mapping script, but this should no longer be necessary as additional patches are available that restore the functionality.

However, it seems those patches are not included in the update for RHEL 7.

See https://gitlab.com/samba-team/samba/-/merge_requests/2253


Version-Release number of selected component (if applicable):
4.10.16-17.el7_9

How reproducible:
always

Steps to Reproduce:
1. Configure samba to use idmap_nss
2. Try to authenticate as DOMAIN\user
3.

Actual results:
Access fails, log shows:

[2021/12/22 08:46:54.786927,  3, pid=17140, effective(0, 0), real(0, 0), class=auth] ../../source3/auth/auth_util.c:1877(check_account)
  Failed to find authenticated user DOMAIN\user via getpwnam(), denying access.


Expected results:
Authentication succeeds as before the security update

Additional info:

It seems https://gitlab.com/samba-team/samba/-/commit/0a546be05295a7e4a552f9f4f0c74aeb2e9a0d6e is not included in the RHEL 7 update.

Comment 3 Trond H. Amundsen 2021-12-22 10:01:04 UTC
We're having the same issue. Even the addition of a username map script doesn't make Samba work properly. We have been forced to downgrade the Samba packages, which is unfortunate given the security issue.

Comment 4 Rik Theys 2021-12-22 10:38:34 UTC
(In reply to Trond H. Amundsen from comment #3)
> We're having the same issue. Even the addition of a username map script
> doesn't make Samba work properly. We have been forced to downgrade the Samba
> packages, which is unfortunate given the security issue.

I've tried with the username map script and it seems to work here. You do have to make sure the script has the bin_t SELinux label otherwise smbd is not allowed to execute it. Maybe that's your issue with the script?

Regards,
Rik

Comment 5 maennlse 2021-12-22 11:02:36 UTC
we're facing similar issues. at least authentication does not work anymore with version 4.10.16-17.
by downgrading the packages authentication succeeds.

our setup is an AD joined samba server used with kerberos authentication on client side.

log shows the following:
```
[2021/12/22 11:46:39.731990,  3] ../../lib/util/access.c:365(allow_access)
  Allowed connection from xx.xx.xx.xx (xx.xx.xx.xx)
[2021/12/22 11:46:39.732227,  3] ../../source3/smbd/oplock.c:1422(init_oplocks)
  init_oplocks: initializing messages.
[2021/12/22 11:46:39.732467,  3] ../../source3/smbd/process.c:1948(process_smb)
  Transaction 0 of length 250 (0 toread)
[2021/12/22 11:46:39.732742,  3] ../../source3/smbd/smb2_negprot.c:293(smbd_smb2_request_process_negprot)
  Selected protocol SMB3_11
[2021/12/22 11:46:40.061199,  0] ../../source3/auth/auth_generic.c:127(auth3_generate_session_info_pac)
  auth3_generate_session_info_pac: winbindd not running - but required as domain member: NT_STATUS_NO_LOGON_SERVERS
[2021/12/22 11:46:40.061344,  3] ../../source3/smbd/smb2_server.c:3213(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_NO_LOGON_SERVERS] || at ../../source3/smbd/smb2_sesssetup.c:146
[2021/12/22 11:46:40.064967,  3] ../../source3/smbd/server_exit.c:236(exit_server_common)
  Server exit (NT_STATUS_END_OF_FILE)
```

Regards,
Sebastian

Comment 6 Trond H. Amundsen 2021-12-22 11:05:41 UTC
(In reply to Rik Theys from comment #4)
> (In reply to Trond H. Amundsen from comment #3)
> > We're having the same issue. Even the addition of a username map script
> > doesn't make Samba work properly. We have been forced to downgrade the Samba
> > packages, which is unfortunate given the security issue.
> 
> I've tried with the username map script and it seems to work here. You do
> have to make sure the script has the bin_t SELinux label otherwise smbd is
> not allowed to execute it. Maybe that's your issue with the script?

That's not the issue unfortunately. We put the script under /usr/libexec/samba where it automatically gets the correct label (bin_t according to policy). With the script in place, it somehow works but not for all users. In particular, Windows users could not mount their home directory. We traced this to an issue with file permissions. We could reproduce this with smbclient, when the permission of the home dir was 700. In summary:

* 4.10.16-17.el7_9 without username map script: Doesn't work at all, Samba doesn't authenticate the user (NT_STATUS_LOGON_FAILURE)
* 4.10.16-17.el7_9 with username map script: No access to files with permissions 700, or ls on the dir (NT_STATUS_ACCESS_DENIED listing \*)
* 4.10.16-15.el7_9 with username map script: same as above
* 4.10.16-15.el7_9 without username map script: Everything works

-trond

Comment 7 Rik Theys 2021-12-22 11:14:27 UTC
Hi Trond,

(In reply to Trond H. Amundsen from comment #6)
> (In reply to Rik Theys from comment #4)
> > (In reply to Trond H. Amundsen from comment #3)
> > > We're having the same issue. Even the addition of a username map script
> > > doesn't make Samba work properly. We have been forced to downgrade the Samba
> > > packages, which is unfortunate given the security issue.
> > 
> > I've tried with the username map script and it seems to work here. You do
> > have to make sure the script has the bin_t SELinux label otherwise smbd is
> > not allowed to execute it. Maybe that's your issue with the script?
> 
> That's not the issue unfortunately. We put the script under
> /usr/libexec/samba where it automatically gets the correct label (bin_t
> according to policy). With the script in place, it somehow works but not for
> all users. In particular, Windows users could not mount their home
> directory. We traced this to an issue with file permissions. We could
> reproduce this with smbclient, when the permission of the home dir was 700.


You are correct: you can authenticate using the map script, but directories with 0700 are not accessible.

Regards,
Rik

Comment 11 Andreas Schneider 2022-01-19 10:42:18 UTC
*** Bug 2041047 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2022-01-31 16:55:55 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 (Critical: samba security and bug fix 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/RHSA-2022:0328


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