Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

smbclient crashes for samba 4.3 and newer

314 views
Skip to first unread message

Helmut Hullen

unread,
Apr 22, 2016, 3:06:21 PM4/22/16
to
Hallo alle miteinander,

when I install samba 4.3.x or 4.4.x and the "nettle-3.2" packet and then
call

smbclient

then this program crashes with a segmentation fault:


Apr 22 17:40:57 Gienah kernel: smbclient[28339]: segfault at 10 ip
40e4f56e sp bf911e30 error 4 in libnettle.so.4.4[40e35000+27000]

Just tested with the packets from slackware-current, the same result
with samba 4.3

ldd $(which smbclient) | grep nettle

shows (since samba 4.3), that smbclient searches for libnettle.so.6 (ok)
and also for libnettle.so.4 (maybe wrong).

Samba 4.2.1 only uses libnettle 4.4, and samba 3.6.x too.

Installing nettle 4.6 and additionally 4.4 doesn't help, and symlinking
also doesn't help.

I need smbclient for my samba shares ...

Viele Gruesse
Helmut

"Ubuntu" - an African word, meaning "Slackware is too hard for me".

Robby Workman

unread,
Apr 23, 2016, 12:10:05 AM4/23/16
to
On 2016-04-22, Helmut Hullen <Hel...@Hullen.de> wrote:
> Hallo alle miteinander,
>
> when I install samba 4.3.x or 4.4.x and the "nettle-3.2" packet and then
> call
>
> smbclient
>
> then this program crashes with a segmentation fault:
>
>
> Apr 22 17:40:57 Gienah kernel: smbclient[28339]: segfault at 10 ip
> 40e4f56e sp bf911e30 error 4 in libnettle.so.4.4[40e35000+27000]
>
> Just tested with the packets from slackware-current, the same result
> with samba 4.3
>
> ldd $(which smbclient) | grep nettle
>
> shows (since samba 4.3), that smbclient searches for libnettle.so.6 (ok)
> and also for libnettle.so.4 (maybe wrong).
>
> Samba 4.2.1 only uses libnettle 4.4, and samba 3.6.x too.


You've got something custom on your system that links libnettle.so.4.4,
and smbclient is linking to something that links that. If you look at
the output of objdump, you'll see that smbclient isn't directly linked
to libnettle at all:

objdump -p $(which smbclient) | grep NEEDED

-RW

Helmut Hullen

unread,
Apr 23, 2016, 6:10:43 AM4/23/16
to
Hallo, Robby,

Du meintest am 23.04.16:

>> when I install samba 4.3.x or 4.4.x and the "nettle-3.2" packet and
>> then call
>>
>> smbclient
>>
>> then this program crashes with a segmentation fault:

[...]

> You've got something custom on your system that links
> libnettle.so.4.4, and smbclient is linking to something that links
> that. If you look at the output of objdump, you'll see that smbclient
> isn't directly linked to libnettle at all:

> objdump -p $(which smbclient) | grep NEEDED

No information for me ...

NEEDED libpthread.so.0
NEEDED libreplace-samba4.so
NEEDED libsamba-errors.so.1
NEEDED libsamba-security-samba4.so
NEEDED libsamba3-util-samba4.so
NEEDED libpopt-samba3-samba4.so
NEEDED libsamba-util.so.0
NEEDED liblibsmb-samba4.so
NEEDED libmsrpc3-samba4.so
NEEDED libsmbconf.so.0
NEEDED libcli-smb-common-samba4.so
NEEDED libtalloc.so.2
NEEDED libdcerpc-samba-samba4.so
NEEDED libndr-standard.so.0
NEEDED libsamba-debug-samba4.so
NEEDED libutil-cmdline-samba4.so
NEEDED libsmbregistry-samba4.so
NEEDED libpopt.so.0
NEEDED libarchive.so.13
NEEDED libc.so.6

------------------

But I've seen "libnettle.so.4" etc. even after "removepkg nettle-2.5*" -
seems there are unwanted remainders.

But when I delete this library and their link, then run "ldconfig -v"
and again "ld $(which smbclient) | grep nettle" then the system tells

libnettle.so.4 => not found

"libnettle.so.6" seems to be ok.

smbclient

then sends only the error message

"smbclient: error while loading shared libraries: libnettle.so.4: cannot
open shared object file: No such file or directory"

My system: 32 bit, self made kernel 3.19.6

Henrik Carlqvist

unread,
Apr 23, 2016, 10:16:14 AM4/23/16
to
On Sat, 23 Apr 2016 12:00:00 +0200, Helmut Hullen wrote:
>>> when I install samba 4.3.x or 4.4.x and the "nettle-3.2" packet and
>>> then call
>>>
>>> smbclient
>>>
>>> then this program crashes with a segmentation fault:

The important information above is that libnettle is not included in the
list, just like Robby said. This means that smbclient does not directly
depend upon libnettle, but one of the libraries above now does. So what
have you done to your system? Which of the above libraries did you
recompile?

> and again "ld $(which smbclient) | grep nettle" then the system tells
>
> libnettle.so.4 => not found

Yes to completely link libnettle is needed as some library that smbclient
depends upon needs libnettle.

So, you can do the following:

ldd $(which smbclient) > /tmp/deps_all.txt
objdump -p $(which smbclient) | grep NEEDED > /tmp/deps_first.txt

If you study those files you will find that deps_all contains more
libraries than deps_first because deps_all lists all libraries needed to
run smbclient which also includes libraries linked by other libraries.

If you for each of the libraries listed in deps_first.txt by looking at
their complete path in deps_all.txt run ldd on them you will find which
library brings you the dependency on libnettle. You can do that by
running commands like:

ldd /usr/lib64/libldap-2.4.so.2

> My system: 32 bit, self made kernel 3.19.6

It is probably not your self made kernel which has broken smbclient but
some self made dynamic library that smbclient links to.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Helmut Hullen

unread,
Apr 23, 2016, 2:14:18 PM4/23/16
to
Hallo, Henrik,

Du meintest am 23.04.16:

> So, you can do the following:

> ldd $(which smbclient) > /tmp/deps_all.txt
> objdump -p $(which smbclient) | grep NEEDED > /tmp/deps_first.txt

> If you study those files you will find that deps_all contains more
> libraries than deps_first because deps_all lists all libraries needed
> to run smbclient which also includes libraries linked by other
> libraries.

> If you for each of the libraries listed in deps_first.txt by looking
> at their complete path in deps_all.txt run ldd on them you will find
> which library brings you the dependency on libnettle.

Nice work ... I'll do my best!

First steps: perhaps there was a problem with remainders from an old
"gnutls" packet.

And perhaps there is a loop with "nettle" and its "libhogweed" library:
this library says it needs libnettle.so.6 _and_ libnettle.so.4
0 new messages