Skip to content
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

kv storage implementation prone to network name attacks using "../" in direct plugin API calls #23

Open
thediveo opened this issue Nov 3, 2022 · 0 comments

Comments

@thediveo
Copy link

thediveo commented Nov 3, 2022

As this project doesn't seem to have a dedicated policy or instructions on reporting a potential security issue, I'm left only with a public issue.

Write_Nw_Config_to_DB constructs a file system path using filepath.Join and using a Docker network ID passed to the driver.

Under normal operations, Docker itself passes only network ID strings consisting of hex digits. However, as the Mellanox SR-IOV plugin is an "external" (unmanaged) plugin, any process with sufficient access rights can call the plugin API via its unix socket and inject arbitrary network IDs, such as ../../../../boot/vmlinuz or similar.

As pointed out above, this requires access to the plugin's API socket, which is probably the same as access to Docker's API socket anyway. With access to the Docker API socket, it is already possible to start privileged containers. However, system admins might overlook this potential attack vector as they are acquainted with the docker socket, but not necessarily with plugin sockets.

Optional: obligatory XKCD "Exploits of a Mom" reference

@thediveo thediveo changed the title kv storage implementation prone to network name attacks using "../" kv storage implementation prone to network name attacks using "../" in direct plugin API calls Nov 3, 2022
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

No branches or pull requests

1 participant