Feature #2375
openDesign and implement sensible per-thread capabilities
Description
It would be a good security improvement if threads could only do what they need to do.
(e.g. A thread that does not need to write to disk also has no capability to do so, etc.).
And linux capabilities are a per-thread attribute (man attributes)
This would contain at least the following subtasks:
- Define sensible capability sets for indivudial thread modules
- check out SCDropCaps() and the libcap-ng bug, which prevented this feature earlier (still there?)
- Implement mechanics to declare and set needed capabilities per thread module
- What to do if a thread changes its thread modules? Can this happen?
This maybe is a bigger change and lots of work, but I would like to do it,
so I flagged it low priority and TBD. Any thoughts on this?
And I should note: this would be linux only since capabilities are a linux feature. FreeBSD has something related called capsicum, but the library we use (libcap-ng) is linux only.
Updated by Victor Julien almost 7 years ago
Basic infra is already in place, see for example source-pfring.c
tmm_modules[TMM_RECEIVEPFRING].cap_flags = SC_CAP_NET_ADMIN | SC_CAP_NET_RAW |
SC_CAP_NET_BIND_SERVICE | SC_CAP_NET_BROADCAST;
Updated by Victor Julien almost 7 years ago
- Related to Feature #276: Libcap support for dropping privileges added
Updated by Victor Julien almost 7 years ago
- Assignee changed from Richard Sailer to Anonymous
Updated by Victor Julien over 6 years ago
- Effort set to medium
- Difficulty set to low
Updated by Victor Julien about 5 years ago
- Assignee changed from Community Ticket to OISF Dev
- Priority changed from Low to Normal
- Target version changed from TBD to 6.0.0beta1
When we first tried this years ago it turned out not to work, I believe due to a bug in libcap-ng. I'm hopeful we can get it to work now.
Updated by Victor Julien over 4 years ago
- Target version changed from 6.0.0beta1 to 7.0.0-beta1
Updated by Victor Julien about 3 years ago
- Target version changed from 7.0.0-beta1 to 8.0.0-beta1