Repository navigation
Unbounded SDK stdout/stderr capture #1628
Description
Relevant area(s)
Linux, macOS, Windows
Brief description of your issue
We have APIs that will launch an executable in a container, collect all the output the executable makes to STDOUT, then return that output once the executable is done. Some examples of these APIs:
Rust SDK: run , run_in_container , wait_with_output
Node SDK: run , runInContainer
C SDK: mxc_run_json
The problem is that there is currently no limits to the STDOUT output gathered. This has the potential to overrun the buffers and memory of the process who called this API to launch the container. This is a potential security risk.
Steps to reproduce
Create a program A that outputs a large amount of data (Gigabytes) to STDOUT within a small time period. Have another program B launch program A within a container using one of the methods mentioned in the description.
Expected behavior
The output from program A should not overwhelm the memory limits of program B. There should be some reasonable maximum limit of output that program B should receive.
Actual behavior
There is no limit to how much output data program B can receive. This can cause an out-of-memory problem for program B, or even a DoS attack.
Activity