Bug 1645576 - Kodi crashes when trying to browse the SMB network
Summary: Kodi crashes when trying to browse the SMB network
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 29
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-02 14:54 UTC by Michael Cronenworth
Modified: 2018-11-03 19:13 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-03 19:13:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Cronenworth 2018-11-02 14:54:01 UTC
Description of problem:
I maintain Kodi in RPMFusion and the latest version of Kodi, 18.0, is crashing when trying to browse the SMB network. The previous version, 17.x, worked fine.

The backtrace shows that Samba was not able to open /dev/urandom, which can't be true and must be masking another issue. The issue occurs on any Fedora 28 or 29 system (multiple user reports). SELinux is disabled and /dev/urandom is chmod' 666.

I also opened a discussion on the Samba list:
https://lists.samba.org/archive/samba/2018-November/219141.html

Version-Release number of selected component (if applicable):
samba-client-libs-4.9.1-2.fc29.x86_64

How reproducible: Always

Steps to Reproduce:
1. Install RPMFusion repo.
2. dnf install kodi
3. Run Kodi
4. Navigate to Movies and "Enter files section"
5. Click on "Add Videos"
6. Click on Browse.
6. Click on "Windows Network (SMB)"

Actual results: Kodi immediately crashes


Expected results: Kodi shows Windows network


Additional info:
Backtrace from samba-client-libs-4.9.1-2.fc29.x86_64:
#0  0x00007fe785c0b53f in raise () from /lib64/libc.so.6
#1  0x00007fe785bf5895 in abort () from /lib64/libc.so.6
#2  0x00007fe782ad97d5 in open_urandom () at ../lib/util/genrand.c:37
#3  generate_random_buffer (out=out@entry=0x7ffeb252b536 ".\025\260\230\027\207\260U",
    len=len@entry=2) at ../lib/util/genrand.c:46
#4  0x00007fe78501fc6e in generate_trn_id () at ../source3/libsmb/namequery.c:1276
#5  name_query_send (mem_ctx=<optimized out>, ev=0x55b08717c250,
    name=name@entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type@entry=1,
    bcast=bcast@entry=true, recurse=recurse@entry=true, addr=0x7fe73c061260)
    at ../source3/libsmb/namequery.c:1276
#6  0x00007fe785020869 in name_queries_send (bcast=true, recurse=true, wait_msec=0,
    timeout_msec=1000, num_addrs=1, addrs=0x7fe73c061260, name_type=1,
    name=0x7fe7884799ed "\001\002__MSBROWSE__\002", ev=0x55b08717c250, mem_ctx=<optimized out>)
    at ../source3/libsmb/namequery.c:1660
#7  name_resolve_bcast_send (mem_ctx=mem_ctx@entry=0x55b087149140, ev=ev@entry=0x55b08717c250,
    name=name@entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type@entry=1)
    at ../source3/libsmb/namequery.c:1858
#8  0x00007fe785020b7b in name_resolve_bcast (
    name=name@entry=0x7fe7884799ed "\001\002__MSBROWSE__\002", name_type=name_type@entry=1,
    mem_ctx=0x55b087176150, return_iplist=return_iplist@entry=0x7ffeb252ba50,
    return_count=return_count@entry=0x7ffeb252ba48) at ../source3/libsmb/namequery.c:1916
#9  0x00007fe788464b2a in SMBC_opendir_ctx (context=0x55b08715a250, fname=0x7ffeb252bf40 "smb://")
    at ../source3/libsmb/libsmb_dir.c:603
#10 0x00007fe788461935 in smbc_opendir (durl=0x7ffeb252bf40 "smb://")
    at ../source3/libsmb/libsmb_compat.c:253
#11 0x000055b0832d4f62 in XFILE::CSMBDirectory::OpenDir(CURL const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ()
(snipped)

Comment 1 Michael Cronenworth 2018-11-03 19:13:58 UTC
Not a Samba bug specifically.

The "read_data()" symbol that is exported by Samba is also exported by Trousers (trousers-lib). Normally trousers is dlopen()'d by GnuTLS, but Kodi is compile-time linking trousers starting with Kodi version 18 (cmake). Kodi version 17 (autotools) did not compile-time link with trousers.

I've opened a ticket with Trousers.

https://sourceforge.net/p/trousers/bugs/224/


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