microsoft / ebpf-for-windows

eBPF implementation that runs on top of Windows
MIT License
2.93k stars 234 forks source link

Pinning semantics are different than on Linux #3737

Open lmb opened 3 months ago

lmb commented 3 months ago

Describe the bug

As far as I can tell pinning is implemented in the driver, by keeping a global hash table mapping strings to handles. Removing a pin is calling the same function with INVALID_HANDLE and the string you want to unpin.

OS information

No response

Steps taken to reproduce bug

Roughly (this is just based on reading the source code):

Expected behavior

The call to unpin from app B should fail.

Actual outcome

The call to unpin from app B doesn't fail.

Additional details

No response

shankarseal commented 3 months ago

Right now since only administrators have privilege to pinning APIs, there is no real security boundary between two applications, and the current behavior is by design.

This is a feature request to apply per-user ACL for pinned objects.