Skip to content

Fix Unprivileged user-namespaces can bypass exePath validation on Linux machine - #435

Open
Zhidong Peng (ZhidongPeng) wants to merge 5 commits into
Azure:devfrom
ZhidongPeng:mount
Open

Zhidong Peng (ZhidongPeng) wants to merge 5 commits into
Azure:devfrom
ZhidongPeng:mount

Conversation

@ZhidongPeng

Copy link
Copy Markdown
Collaborator
  • extend linux eBPF program and maps to capture executable identity (device and inode numbers).
  • when match identity exePath for linux platform, it compares its file metadata.dev() and metadata.ino() instead of the exePath string match.
  • Impl pentest C3 and ensure the test result passed
=== WS-S9-exepath-identity: enforce + deny; identity restricts to exePath=/usr/bin/curl
  ... waiting 20s for rule refresh ...
[PASS] WS-S9-exepath-identity/python_caller_denied  expected=403 actual=403 path=/machine/?comp=goalstate
[PASS] WS-S9-exepath-identity/curl_caller_allowed  expected=200 actual=200 (curl invocation)
[PASS] C3  expected=403 actual=403; caller /proc/<pid>/exe bind-mounted over allow-listed /usr/bin/curl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant