linux/drivers/iommu/amd
Kees Cook 8503d0fcb1 iommu/amd: Avoid stack buffer overflow from kernel cmdline
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: Simcha Kosman <simcha.kosman@cyberark.com>
Closes: https://lore.kernel.org/all/AS8P193MB2271C4B24BCEDA31830F37AE84A52@AS8P193MB2271.EURP193.PROD.OUTLOOK.COM
Fixes: b6b26d86c6 ("iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter")
Signed-off-by: Kees Cook <kees@kernel.org>
Reviewed-by: Ankit Soni <Ankit.Soni@amd.com>
Link: https://lore.kernel.org/r/20250804154023.work.970-kees@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2025-08-15 11:50:47 +02:00
..
Kconfig iommu/amd: Convert to msi_create_parent_irq_domain() helper 2025-07-04 10:28:10 +02:00
Makefile iommu: make inclusion of amd directory conditional 2025-05-16 08:46:46 +02:00
amd_iommu.h iommu/amd: Refactor AMD IOMMU debugfs initial setup 2025-07-15 11:41:52 +01:00
amd_iommu_types.h ARM: 2025-07-30 17:14:01 -07:00
debugfs.c iommu/amd: Add debugfs support to dump IRT Table 2025-07-15 11:41:53 +01:00
init.c iommu/amd: Avoid stack buffer overflow from kernel cmdline 2025-08-15 11:50:47 +02:00
io_pgtable.c iommu/amd: Add efr[HATS] max v1 page table level 2025-06-27 08:51:20 +02:00
io_pgtable_v2.c iommu/pages: Remove iommu_alloc_page_node() 2025-04-17 16:22:51 +02:00
iommu.c ARM: 2025-07-30 17:14:01 -07:00
pasid.c iommu/amd: Consolidate protection domain free code 2025-03-10 09:27:11 +01:00
ppr.c iommu/pages: Remove the order argument to iommu_free_pages() 2025-04-17 16:22:33 +02:00
quirks.c