iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter
stable inclusion from stable-v5.10.175 commit f2a5ec7f7b28f9b9cd5fac232ff51019a7f7b9e9 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8711T Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f2a5ec7f7b28f9b9cd5fac232ff51019a7f7b9e9 -------------------------------- [ Upstream commit b6b26d86 ] The 'acpiid' buffer in the parse_ivrs_acpihid function may overflow, because the string specifier in the format string sscanf() has no width limitation. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ca3bf5d4 ("iommu/amd: Introduces ivrs_acpihid kernel parameter") Cc: stable@vger.kernel.org Signed-off-by:Ilia.Gavrilov <Ilia.Gavrilov@infotecs.ru> Reviewed-by:
Kim Phillips <kim.phillips@amd.com> Link: https://lore.kernel.org/r/20230202082719.1513849-1-Ilia.Gavrilov@infotecs.ru Signed-off-by:
Joerg Roedel <jroedel@suse.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment