Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 600210

Summary: net-misc/llddp-0.9.4 fails to start with +seccomp
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: lldpd-0.9.5-seccomp-add-sendmmsg.patch

Description Sven E. 2016-11-19 03:15:30 UTC
Once again lddpd fails to start with seccomp enabled

Reproducible: Always

Steps to Reproduce:
1. build lldpd with +seccomp
2. start
3. crash/exit
Actual Results:  
lldpd fails to start up and bails out, again a seccomp issue (as with 0.9.1 #577576) this time it is about mprotect() being called (which seems to be disallowed).

Expected Results:  
A working lldpd

Maybe the ebuild should default to -seccomp in ISUE until the authors get seccomp into a mature state within lldpd?
Comment 1 Patrick McLean gentoo-dev 2016-12-03 00:20:11 UTC
The ebuild does default to -seccomp, you must have it enabled globally in your make.conf.

This should be fixed via a patch in net-misc/lldpd-0.9.5, I have also opened a PR upstream:
https://github.com/vincentbernat/lldpd/pull/213
Comment 2 Sven E. 2016-12-03 00:28:52 UTC
Nope, no seccomp in make.conf.

Last time I checked, the ebuild had seccomp instead of -seccomp in IUSE, so it does not forcefully disable seccomp, even though lldpd is repeatedly broken with regards to seccomp. (Not enabling it is a different state).

seccomp might be enabled by a profile.
Comment 3 Sven E. 2016-12-03 22:44:00 UTC
BTW: v0.9.5 bails for sendmmsg.

Looks like the lddpd folks are getting nowhere with their seccomp stuff.
Comment 4 Patrick McLean gentoo-dev 2016-12-04 06:13:41 UTC
Created attachment 455044 [details, diff]
lldpd-0.9.5-seccomp-add-sendmmsg.patch

This patch should help with that, please test it and report if you have any other issues.

Feel free to add an entry to package.use to disable the seccomp USE flag if you want.
Comment 5 Sven E. 2016-12-05 13:37:47 UTC
Invalid syscall attempted: recvfrom(45)
Invalid syscall not allowed: stop here
Comment 6 Sven E. 2016-12-05 13:47:48 UTC
After adding recvfrom lldpd seems to start.