Attempting to load sss.so in Bionic fails due to SMB_IDMAP_INTERFACE_VERSION mismatch

Bug #1834507 reported by Pedro Principeza
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sssd (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
Medium
Eric Desrochers

Bug Description

[Impact]

When attempting to load the sss.so module, on a Bionic box running samba-* on 4.7 and sssd-* 1.16.1, one sees the following in syslog:

winbindd[13099]: load_module_absolute_path: Module '/usr/lib/x86_64-linux-gnu/samba/idmap/sss.so' loaded
winbindd[13099]: Failed to register idmap module.
winbindd[13099]: The module was compiled against SMB_IDMAP_INTERFACE_VERSION 5,
winbindd[13099]: current SMB_IDMAP_INTERFACE_VERSION is 6.

This issue has been reported upstream, and made it into 1.16.2+ version of sssd, but not into 1.16.1, which is currently found in Bionic.

[Test Case]

* sudo apt update
* sudo apt install sssd winbind
* Create this /etc/samba/smb.conf:
[global]
        log file = /var/log/samba/log.%m
        map to guest = Bad User
        max log size = 1000
        panic action = /usr/share/samba/panic-action %d
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        syslog = 0
        idmap config * : backend = sss
        idmap config * : range = 200000-2147483647

* sudo systemctl restart winbind
Run this command to trigger the loading of the sss module. It will fail because, among other reasons, this machine is not part of a domain, but that's fine:
# wbinfo --allocate-uid
failed to call wbcAllocateUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not allocate a uid

Now /var/log/samba/log.winbindd-idmap will contain:
[2019/06/27 17:45:18.420790, 0] ../source3/winbindd/idmap.c:328(smb_register_idmap)
  Failed to register idmap module.
  The module was compiled against SMB_IDMAP_INTERFACE_VERSION 5,
  current SMB_IDMAP_INTERFACE_VERSION is 6.
  Please recompile against the current version of samba!
[2019/06/27 17:45:18.421110, 0] ../lib/util/modules.c:173(load_module_absolute_path)
  load_module_absolute_path: Module '/usr/lib/x86_64-linux-gnu/samba/idmap/sss.so' initialization failed: {Wrong Type} There is a mismatch between the type of object that is required by the requested operation and the type of object that is specified in the request.

This confirms the bug.

[Regression Potential]

This patch changed the Version to 6 for winbindd to loads the backend properly, I don't expect any problem, but if there is, we will need to fix then, cause winbindd needs requires version "6".

A test (pre-sru) package has been tested by an impacted user:
"winbind is now able to load the sss backend."

# Feedback from other linux distro (arch linux):
https://bugs.archlinux.org/task/56723
"sssd is stable and I could not identify any side-effects."

[Other information]

*Cosmic and late aren't impacted.
*Xenial is not impacted, as it doesn't uses version "6"
-----
samba-4.3.11+dfsg/source3/include/idmap.h:
#define SMB_IDMAP_INTERFACE_VERSION 5
-----

*Upstream:
https://pagure.io/SSSD/sssd/issue/3741
https://github.com/SSSD/sssd/pull/572
https://github.com/SSSD/sssd/commit/b78fced9263a2aa2d229879a868825aa7ebe19ac

Revision history for this message
Eric Desrochers (slashd) wrote :

Seems like a known bug already fix upstream in sssd-1_16_2.

https://pagure.io/SSSD/sssd/issue/3741
https://github.com/SSSD/sssd/pull/572

tags: added: sts
Changed in sssd (Ubuntu):
status: New → Fix Released
Changed in sssd (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

While I try to reproduce this, it would speed things up if you had a sample config that shows the problem. We could then also use this as a test case to verify the fix.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, reproduced:
[2019/06/27 17:35:46.930548, 0] ../source3/winbindd/idmap.c:328(smb_register_idmap)
  Failed to register idmap module.
  The module was compiled against SMB_IDMAP_INTERFACE_VERSION 5,
  current SMB_IDMAP_INTERFACE_VERSION is 6.
  Please recompile against the current version of samba!
[2019/06/27 17:35:46.930706, 0] ../lib/util/modules.c:173(load_module_absolute_path)
  load_module_absolute_path: Module '/usr/lib/x86_64-linux-gnu/samba/idmap/sss.so' initialization failed: {Wrong Type} There is a mismatch between the type of object that is required by the requested operation and the type of object that is specified in the request.
[2019/06/27 17:35:46.931486, 3] ../source3/winbindd/idmap.c:407(idmap_init_domain)
  Could not probe idmap module sss

Changed in sssd (Ubuntu):
status: Fix Released → Confirmed
importance: Undecided → High
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Quick test case, to be used in the sru template later on:

sudo apt update
sudo apt install sssd winbind
create this /etc/samba/smb.conf:
[global]
        log file = /var/log/samba/log.%m
        map to guest = Bad User
        max log size = 1000
        panic action = /usr/share/samba/panic-action %d
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        syslog = 0
        idmap config * : backend = sss
        idmap config * : range = 200000-2147483647

sudo systemctl restart winbind
Run this command to trigger the loading of the sss module. It will fail because, among other reasons, this machine is not part of a domain, but that's fine:
# wbinfo --allocate-uid
failed to call wbcAllocateUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not allocate a uid

Now /var/log/samba/log.winbindd-idmap will contain:
[2019/06/27 17:45:18.420790, 0] ../source3/winbindd/idmap.c:328(smb_register_idmap)
  Failed to register idmap module.
  The module was compiled against SMB_IDMAP_INTERFACE_VERSION 5,
  current SMB_IDMAP_INTERFACE_VERSION is 6.
  Please recompile against the current version of samba!
[2019/06/27 17:45:18.421110, 0] ../lib/util/modules.c:173(load_module_absolute_path)
  load_module_absolute_path: Module '/usr/lib/x86_64-linux-gnu/samba/idmap/sss.so' initialization failed: {Wrong Type} There is a mismatch between the type of object that is required by the requested operation and the type of object that is specified in the request.

This confirms the bug.

Eric Desrochers (slashd)
Changed in sssd (Ubuntu):
status: Confirmed → Fix Released
Changed in sssd (Ubuntu Bionic):
status: New → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Since it's fixed in cosmic and later, marking the main task as fix released.

Changed in sssd (Ubuntu Bionic):
status: In Progress → Confirmed
Eric Desrochers (slashd)
description: updated
Changed in sssd (Ubuntu Bionic):
assignee: nobody → Eric Desrochers (slashd)
status: Confirmed → In Progress
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
Changed in sssd (Ubuntu Bionic):
assignee: Eric Desrochers (slashd) → nobody
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Changed in sssd (Ubuntu Bionic):
assignee: nobody → Eric Desrochers (slashd)
Revision history for this message
Eric Desrochers (slashd) wrote :

Uploaded in bionic.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Pedro, or anyone else affected,

Accepted sssd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sssd/1.16.1-1ubuntu1.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sssd (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION BIONIC]

# Version currently found in bionic-updates "1.16.1-1ubuntu1.3":

The reproducer result to the following:
[2019/09/09 13:18:32.950168, 0] ../lib/util/modules.c:173(load_module_absolute_path)
  load_module_absolute_path: Module '/usr/lib/x86_64-linux-gnu/samba/idmap/sss.so' initialization failed: {Wrong Type} There is a mismatch between the type of object that is required by the requested oper
ation and the type of object that is specified in the request.

# Version currently found in bionic-proposed "1.16.1-1ubuntu1.4:"

* Enable bionic-proposed
* sudo apt update
* sudo apt install sssd winbind
* Create this /etc/samba/smb.conf:
[global]
        log file = /var/log/samba/log.%m
        map to guest = Bad User
        max log size = 1000
        panic action = /usr/share/samba/panic-action %d
        server role = standalone server
        server string = %h server (Samba, Ubuntu)
        syslog = 0
        idmap config * : backend = sss
        idmap config * : range = 200000-2147483647

* sudo systemctl restart winbind
Run this command to trigger the loading of the sss module. It will fail because, among other reasons, this machine is not part of a domain, but that's fine:
# wbinfo --allocate-uid
failed to call wbcAllocateUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not allocate a uid

No more errors in /var/log/samba/log.winbindd-idmap

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sssd - 1.16.1-1ubuntu1.4

---------------
sssd (1.16.1-1ubuntu1.4) bionic; urgency=medium

  * debian/rules:
    - Add --with-smb-idmap-interface-version=6
  * d/p/winbind-idmap-plugin-support-inferface-version-6.patch:
    - winbind idmap plugin: support inferface version 6
    (LP: #1834507)

 -- Eric Desrochers <email address hidden> Thu, 27 Jun 2019 17:49:45 +0000

Changed in sssd (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for sssd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.