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

Bug 564904

Summary: net-wireless/hostapd introduce the filecaps USE flag
Product: Gentoo Linux Reporter: Nick Kossifidis <mickflemm>
Component: Current packagesAssignee: Bjarke Istrup Pedersen (RETIRED) <gurligebis>
Status: RESOLVED NEEDINFO    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nick Kossifidis 2015-11-04 22:47:26 UTC
HostAPd is a rather complex application and running with full root privileges introduces possible security risks. It can be limited to use only the needed capabilities (cap_net_admin,cap_net_raw+ei) instead through the filecaps USE flag.
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2015-11-14 13:43:35 UTC
How can it be limited to just have the privileges it needs?

Just adding a use flag does not do anything, and from what I can read, there does not seem to be a way to compile hostapd to work like this.

Can you please give me a link to more info on how to build hostapd this way? (Or a patch for the ebuild if you already have it running locally)
Comment 2 Nick Kossifidis 2015-11-15 09:33:55 UTC
This is how it runs on android from what I know. I got the flags from android's https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/site_tests/security_SuidBinaries/baseline.fscap Unfortunately I can't test it on my current Gentoo hardened set up (no hardware). More on the make process here -> https://android.googlesource.com/platform/external/wpa_supplicant_8/ I'll be able to help more on this in a couple of months where I'll return to my lab. Thanks for your time.
Comment 3 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2015-11-15 10:38:41 UTC
Okay, I have taken a look there, but nothing I can find in there seems to point in the right direction.

Closing for now - please feel free to reopen when you get time later on :-)