diff options
author | Vegard Nossum <vegard.nossum@oracle.com> | 2024-01-10 20:47:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-01 03:18:46 +0300 |
commit | e961f8c6966abbd486ff87549e29e53f3c69b685 (patch) | |
tree | 438ec1fbd5f1c3833a0386a814195d9f015ebc9b /Documentation/arch/x86/features.rst | |
parent | db6e7e5fd442f05b48ada0ca43eac38d6ec92b80 (diff) | |
download | linux-e961f8c6966abbd486ff87549e29e53f3c69b685.tar.xz |
docs: kernel_feat.py: fix potential command injection
[ Upstream commit c48a7c44a1d02516309015b6134c9bb982e17008 ]
The kernel-feat directive passes its argument straight to the shell.
This is unfortunate and unnecessary.
Let's always use paths relative to $srctree/Documentation/ and use
subprocess.check_call() instead of subprocess.Popen(shell=True).
This also makes the code shorter.
This is analogous to commit 3231dd586277 ("docs: kernel_abi.py: fix
command injection") where we did exactly the same thing for
kernel_abi.py, somehow I completely missed this one.
Link: https://fosstodon.org/@jani/111676532203641247
Reported-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240110174758.3680506-1-vegard.nossum@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'Documentation/arch/x86/features.rst')
-rw-r--r-- | Documentation/arch/x86/features.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/arch/x86/features.rst b/Documentation/arch/x86/features.rst index b663f15053ce..a33616346a38 100644 --- a/Documentation/arch/x86/features.rst +++ b/Documentation/arch/x86/features.rst @@ -1,3 +1,3 @@ .. SPDX-License-Identifier: GPL-2.0 -.. kernel-feat:: $srctree/Documentation/features x86 +.. kernel-feat:: features x86 |