#2457 Responder crashes if back end terminates sbus connection
Closed: Invalid Opened by jhrozek.

I found this bug while working on non-root SSSD. The responders were already running as an ordinary user, but the backend was still running as root and also didn't allow other non-root UIDs to connect to the sbus socket.

This was the valgrind trace:

==1455== Invalid read of size 8
==1455==    at 0x506C870: sbus_watch_handler (sssd_dbus_common.c:93)
==1455==    by 0x52A630A: ??? (in /usr/lib64/libtevent.so.0.9.21)
==1455==    by 0x52A47D6: ??? (in /usr/lib64/libtevent.so.0.9.21)
==1455==    by 0x52A0FBC: _tevent_loop_once (in /usr/lib64/libtevent.so.0.9.21)
==1455==    by 0x52A115A: tevent_common_loop_wait (in /usr/lib64/libtevent.so.0.9.21)
==1455==    by 0x52A4776: ??? (in /usr/lib64/libtevent.so.0.9.21)
==1455==    by 0x50781B8: server_loop (server.c:656)
==1455==    by 0x406693: main (nsssrv.c:588)
==1455==  Address 0xa4e9600 is 144 bytes inside a block of size 152 free'd
==1455==    at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==1455==    by 0x54AD472: _talloc_free (in /usr/lib64/libtalloc.so.2.1.1)
==1455==    by 0x506D095: sbus_remove_watch (sssd_dbus_common.c:277)
==1455==    by 0x5B1A7D2: _dbus_watch_list_remove_watch (dbus-watch.c:419)
==1455==    by 0x5B18E6D: free_watches (dbus-transport-socket.c:91)
==1455==    by 0x5B18EA8: socket_disconnect (dbus-transport-socket.c:1019)
==1455==    by 0x5B18316: _dbus_transport_disconnect (dbus-transport.c:509)
==1455==    by 0x5B18E00: do_io_error (dbus-transport-socket.c:238)
==1455==    by 0x5B1954B: do_reading (dbus-transport-socket.c:867)
==1455==    by 0x5B19C80: socket_handle_watch (dbus-transport-socket.c:964)
==1455==    by 0x5B1875C: _dbus_transport_handle_watch (dbus-transport.c:885)
==1455==    by 0x5B025BC: _dbus_connection_handle_watch (dbus-connection.c:1515)
==1455==

We should be more resilient in failure cases and we should not crash.


Since this is 'just' fixing misbehaving when sbus socket goes away and the service is restarted by the monitor immediatelly, I'm moving the ticket to 1.14

milestone: NEEDS_TRIAGE => SSSD 1.14 beta

Fields changed

rhbz: => todo

This might actually be related to the crashes we saw in downstream recently..

sensitive: => 0

Pavel, is this solved by your current DP patches or the follow up you will do in 1.15?

cc: => pbrezina
milestone: SSSD 1.14 beta => SSSD 1.14 backlog

This should be solved with Pavel's DP request refactoring. Closing. If you can reproduce the issue with 1.14 or newer, please reopen the ticket or file a new one.

resolution: => worksforme
status: new => closed

Since the 1.14 branch is transitioning into maintenance mode and new functionality is being developed in master which will become 1.15 eventually, I'm mass-moving tickets from the 1.14 backlog milestone to the "Future releases" milestone.

milestone: SSSD 1.14 backlog => SSSD Future releases (no date set yet)

Metadata Update from @jhrozek:
- Issue set to the milestone: SSSD Future releases (no date set yet)

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/3499

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata