-
Notifications
You must be signed in to change notification settings - Fork 233
Add an NFS proxy server for cross-sandbox persistence #1738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| func (p *Proxy) getPrefixFromSandbox(conn net.Conn) (string, error) { | ||
| sbx, err := p.sandboxes.GetByHostPort(conn.RemoteAddr().String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security issue: Sandbox isolation could be bypassed. The GetByHostPort method matches based on IP address, but conn.RemoteAddr() returns the client's IP which could be spoofed or shared between sandboxes if they use NAT. Consider using a more secure authentication mechanism.
| data, err := exec.CommandContext(ctx, "bash", "-c", fmt.Sprintf(` | ||
| set -e | ||
| mkdir -p %q | ||
| mount -v -t nfs -o mountproto=tcp,mountport=2049,proto=tcp,port=2049,nfsvers=3,noacl %q %q | ||
| `, path, nfsTarget, path)).CombinedOutput() |
Check failure
Code scanning / CodeQL
Command built from user-controlled sources Critical
user-provided value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is executed in their sandbox with sudo credentials. There's nothing for them to hack, they already have root.
03d6852 to
ebca825
Compare
This reverts commit 91da71d.
nfs needs them, quietly fail to adhere to spec instead
No description provided.