Skip to content
Commit e961f8c6 authored by Vegard Nossum's avatar Vegard Nossum Committed by Greg Kroah-Hartman
Browse files

docs: kernel_feat.py: fix potential command injection

[ Upstream commit c48a7c44 ]

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 3231dd58 ("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: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240110174758.3680506-1-vegard.nossum@oracle.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent db6e7e5f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment