Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577576 - net-misc/lldpd-0.9.1 fails to start with USE="seccomp"
Summary: net-misc/lldpd-0.9.1 fails to start with USE="seccomp"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-16 18:29 UTC by Sven E.
Modified: 2016-06-07 21:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven E. 2016-03-16 18:29:18 UTC
After upgrading from older version lldpd refuses to start.

Reproducible: Always

Steps to Reproduce:
upgrade and restart lldpd
Actual Results:  
failure to start - While openrc claims a successfull start the daemon doesn'T actually start

Expected Results:  
normal startup.

Excerpt from log:
Mar 16 19:12:58 [lldpd] protocol LLDP enabled
Mar 16 19:12:58 [lldpd] libevent 2.1.5-beta initialized with epoll method
Mar 16 19:12:58 [lldpd] invalid syscall attempted: getsockname(51)
Mar 16 19:12:58 [lldpd] invalid syscall not allowed: stop here
Mar 16 19:12:58 [lldpcli] unable to get configuration from lldpd. A failure occured during callback processing
Mar 16 19:12:58 [lldpcli] an error occurred while executing last command

Try a detached start:
lldpd -d
2016-03-16T19:16:11 [WARN/control] unable to connect to socket /run/lldpd.socket: Connection refused

This is weird, actually I'd expect output of all messages from the log to stdout/stderr. 

Any idea how to pinpoint what'S going wrong with the getsockname() call?
Comment 1 Sven E. 2016-03-16 19:17:36 UTC
I think I found something in the strace output:
[pid 17045] socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE) = 4
[pid 17045] bind(4, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
[pid 17045] syscall_18446744073709551615(0x4, 0x7fff64089680, 0x7fff6408967c, 0, 0x55cab88961e0, 0x7f0fb8b91a00) = 0x33
[pid 17045] --- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0x7f0fb8008827, si_syscall=__NR_getsockname, si_arch=AUDIT_ARCH_X86_64} ---

As I understand it, seccomp triggers a SIGSYS, as lldpd calls the disallowed call getsockname()?
Comment 2 Sven E. 2016-03-16 19:31:07 UTC
Indeed lldpd starts as expected with USE="-seccomp"
Comment 3 Patrick McLean gentoo-dev 2016-06-07 21:45:30 UTC
Fixed with version bump to 0.9.3

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e16c20f579725ccbf5b0998718b8a1f0c8a4f8cc