Skip to content

Commit c48a7c4

Browse files
vegardJonathan Corbet
authored andcommitted
docs: kernel_feat.py: fix potential command injection
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 3231dd5 ("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
1 parent 1f4cac0 commit c48a7c4

22 files changed

Lines changed: 32 additions & 65 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features
3+
.. kernel-feat:: features
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features arc
3+
.. kernel-feat:: features arc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features arm
3+
.. kernel-feat:: features arm
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features arm64
3+
.. kernel-feat:: features arm64
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features loongarch
3+
.. kernel-feat:: features loongarch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features m68k
3+
.. kernel-feat:: features m68k
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features mips
3+
.. kernel-feat:: features mips
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features nios2
3+
.. kernel-feat:: features nios2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features openrisc
3+
.. kernel-feat:: features openrisc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.. SPDX-License-Identifier: GPL-2.0
22
3-
.. kernel-feat:: $srctree/Documentation/features parisc
3+
.. kernel-feat:: features parisc

0 commit comments

Comments
 (0)