fix: use subprocess instead of os.system in locktests.py#1315
Conversation
Automated security fix generated by Orbis Security AI
|
@pevik the test looks more or less abandoned, should we remove the complete locktests.py instead? |
I tried in the past (https://lore.kernel.org/linux-nfs/20200720091449.19813-1-pvorel@suse.cz/), there are answers: from J. Bruce Fields (ex. NFSD maintainer)
and Christoph Hellwig:
I wonder if we should just send RFC patch and Cc linux-nfs@vger.kernel.org and fstests@vger.kernel.org. |
|
@pevik I guess that we can try that after the May release. |
Summary
Fix critical severity security issue in
testcases/network/nfsv4/locks/locktests.py.Vulnerability
V-001testcases/network/nfsv4/locks/locktests.py:53Description: The NFS lock test script locktests.py constructs shell command strings from external inputs (command-line arguments or parameters) and passes them directly to os.system(). The os.system() call invokes /bin/sh -c, meaning any shell metacharacters in the command string are interpreted by the shell. Five separate call sites are affected. Because NFS tests commonly run as root, a successful injection results in arbitrary command execution with full system privileges.
Changes
testcases/network/nfsv4/locks/locktests.pyVerification
Automated security fix by OrbisAI Security