On Fri, 18 Jun 2021 at 11:55, Maciej Żenczykowski
[off-list ref] wrote:
This reverts commit d37300ed182131f1757895a62e556332857417e5.
This breaks Android userspace which expects to be able to
fetch programs with just read permissions.
Sorry about this! I'll defer to the maintainers what to do here.
Reverting leaves us with a gaping hole for access control of pinned
programs.
--
Lorenz Bauer | Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK
www.cloudflare.com
From: Maciej Żenczykowski <hidden> Date: 2021-06-18 18:38:20
On Fri, Jun 18, 2021 at 4:55 AM Lorenz Bauer [off-list ref] wrote:
On Fri, 18 Jun 2021 at 11:55, Maciej Żenczykowski
[off-list ref] wrote:
quoted
This reverts commit d37300ed182131f1757895a62e556332857417e5.
This breaks Android userspace which expects to be able to
fetch programs with just read permissions.
Sorry about this! I'll defer to the maintainers what to do here.
Reverting leaves us with a gaping hole for access control of pinned
programs.
Not sure what hole you're referring to. Could you provide more
details/explanation?
It seems perfectly reasonable to be able to get a program with just read privs.
After all, you're not modifying it, just using it.
AFAIK there is no way to modify a program after it was loaded, has this changed?
if so, the checks should be on the modifications not the fd fetch.
I guess one could argue fetching with write only privs doesn't make sense?
Anyway... userspace is broken... so revert is the answer.
In Android the process loading/pinning bpf maps/programs is a different
process (the 'bpfloader') to the users (which are far less privileged)
As a follow up, what does Android expect to be able to do with this
read only FD?
Lorenz
--
Lorenz Bauer | Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK
www.cloudflare.com
As a follow up, what does Android expect to be able to do with this
read only FD?
I'm not actually sure of all the use cases, but at a bare minimum:
We use it for iptables xt_bpf, and to attach to cgroup net hooks and
tc bpf hooks.
There's also some still incomplete support for xdp.
There's also non-networking stuff like gpu memory tracking and
tracepoints that I know very little about - probably something perf
related.
So I think the answer is that mostly we expect to be able to attach it
to places (iptables/cgroup/tc/xdp/....others...??)