fix: use subprocess instead of os.system in set_sysctls.py#101
Open
orbisai0security wants to merge 1 commit into
Open
fix: use subprocess instead of os.system in set_sysctls.py#101orbisai0security wants to merge 1 commit into
orbisai0security wants to merge 1 commit into
Conversation
Automated security fix generated by Orbis Security AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix critical severity security issue in
gtests/net/tcp/common/set_sysctls.py.Vulnerability
V-001gtests/net/tcp/common/set_sysctls.py:29Description: The script reads sysctl path/value pairs directly from sys.argv[1:] at line 29 and constructs shell command strings using % string formatting. These strings are passed directly to os.system() at line 39 (for writing sysctl values) and line 41 (for chmod). No sanitization, validation, or allowlisting of input is performed. An attacker who controls the command-line arguments — including any CI/CD pipeline, test orchestration system, or local user invoking the script — can inject shell metacharacters to execute arbitrary OS commands. Because sysctl manipulation requires root privileges, this script is routinely executed as root, making successful exploitation equivalent to full system compromise.
Changes
gtests/net/tcp/common/set_sysctls.pyVerification
Automated security fix by OrbisAI Security