From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.20931.1660681724485556644 for ; Tue, 16 Aug 2022 13:28:44 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: dimitrije.pavlov@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5CBF106F; Tue, 16 Aug 2022 13:28:43 -0700 (PDT) Received: from mammon-apollo-f36.austin.arm.com (mammon-apollo-f36.austin.arm.com [10.118.12.61]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A9673F66F; Tue, 16 Aug 2022 13:28:43 -0700 (PDT) From: "Dimitrije Pavlov" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Liming Gao , Sunny Wang , Jeff Booher-Kaeding , Samer El-Haj-Mahmoud , Sunny Wang Subject: [PATCH v3 0/3] OvmfPkg: Check arguments for validity Date: Tue, 16 Aug 2022 15:28:34 -0500 Message-Id: <20220816202837.3257608-1-dimitrije.pavlov@arm.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Some functions across OVMF don't check pointer arguments for validity, which causes null pointer dereferences and crashes in the SCT test suite. This series adds checks to return EFI_INVALID_PARAMETER if a pointer argument is NULL. v3: - Fix coding standard issues to pass CI checks [Ard] v2: https://edk2.groups.io/g/devel/message/92443 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Liming Gao Cc: Sunny Wang Cc: Jeff Booher-Kaeding Cc: Samer El-Haj-Mahmoud Reviewed-by: Sunny Wang Dimitrije Pavlov (3): OvmfPkg/PlatformDxe: Check ExtractConfig and RouteConfig arguments OvmfPkg/VirtioGpuDxe: Check QueryMode arguments OvmfPkg/VirtioFsDxe: Check GetDriverName arguments OvmfPkg/PlatformDxe/Platform.c | 8 ++++++++ OvmfPkg/VirtioFsDxe/DriverBinding.c | 4 ++++ OvmfPkg/VirtioGpuDxe/Gop.c | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) --=20 2.37.2