Commit a732502b authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

iommu/amd: Avoid stack buffer overflow from kernel cmdline



[ Upstream commit 8503d0fc ]

While the kernel command line is considered trusted in most environments,
avoid writing 1 byte past the end of "acpiid" if the "str" argument is
maximum length.

Reported-by: default avatarSimcha Kosman <simcha.kosman@cyberark.com>
Closes: https://lore.kernel.org/all/AS8P193MB2271C4B24BCEDA31830F37AE84A52@AS8P193MB2271.EURP193.PROD.OUTLOOK.COM


Fixes: b6b26d86 ("iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter")
Signed-off-by: default avatarKees Cook <kees@kernel.org>
Reviewed-by: default avatarAnkit Soni <Ankit.Soni@amd.com>
Link: https://lore.kernel.org/r/20250804154023.work.970-kees@kernel.org


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ad8a9d38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment