[edk2-devel] [PATCH v2 0/3] OvmfPkg: Check arguments for validity

Dimitrije Pavlov posted 3 patches 1 year, 8 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
OvmfPkg/PlatformDxe/Platform.c      | 8 ++++++++
OvmfPkg/VirtioFsDxe/DriverBinding.c | 4 ++++
OvmfPkg/VirtioGpuDxe/Gop.c          | 4 +++-
3 files changed, 15 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH v2 0/3] OvmfPkg: Check arguments for validity
Posted by Dimitrije Pavlov 1 year, 8 months ago
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.

v2:
- Add Liming Gao to Cc [Ard]
- Turn individual patches into a series [Ard]
- Fix issue with corrupted patches [Ard]

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

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          | 4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92443): https://edk2.groups.io/g/devel/message/92443
Mute This Topic: https://groups.io/mt/93040550/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/3] OvmfPkg: Check arguments for validity
Posted by Sunny Wang 1 year, 8 months ago
The series looks good to me.
Reviewed-by: Sunny Wang <sunny.wang@arm.com>

-----Original Message-----
From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
Sent: 15 August 2022 17:31
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: [PATCH v2 0/3] OvmfPkg: Check arguments for validity

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.

v2:
- Add Liming Gao to Cc [Ard]
- Turn individual patches into a series [Ard]
- Fix issue with corrupted patches [Ard]

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Sunny Wang <Sunny.Wang@arm.com>
Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>

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          | 4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

--
2.37.2

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92475): https://edk2.groups.io/g/devel/message/92475
Mute This Topic: https://groups.io/mt/93040550/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/3] OvmfPkg: Check arguments for validity
Posted by Ard Biesheuvel 1 year, 8 months ago
On Tue, 16 Aug 2022 at 13:39, Sunny Wang <Sunny.Wang@arm.com> wrote:
>
> The series looks good to me.
> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
>
> -----Original Message-----
> From: Dimitrije Pavlov <dimitrije.pavlov@arm.com>
> Sent: 15 August 2022 17:31
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao <jiewen.yao@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Sunny Wang <Sunny.Wang@arm.com>; Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> Subject: [PATCH v2 0/3] OvmfPkg: Check arguments for validity
>
> 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.
>
> v2:
> - Add Liming Gao to Cc [Ard]
> - Turn individual patches into a series [Ard]
> - Fix issue with corrupted patches [Ard]
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Sunny Wang <Sunny.Wang@arm.com>
> Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
>
> Dimitrije Pavlov (3):
>   OvmfPkg/PlatformDxe: Check ExtractConfig and RouteConfig arguments
>   OvmfPkg/VirtioGpuDxe: Check QueryMode arguments
>   OvmfPkg/VirtioFsDxe: Check GetDriverName arguments
>

I tried to push these but they failed in CI.

Could you please have a look and respin with the reported issues
addressed? Thanks.

https://github.com/tianocore/edk2/pull/3211


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92482): https://edk2.groups.io/g/devel/message/92482
Mute This Topic: https://groups.io/mt/93040550/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/3] OvmfPkg: Check arguments for validity
Posted by Ard Biesheuvel 1 year, 8 months ago
On Mon, 15 Aug 2022 at 18:31, Dimitrije Pavlov <dimitrije.pavlov@arm.com> wrote:
>
> 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.
>
> v2:
> - Add Liming Gao to Cc [Ard]
> - Turn individual patches into a series [Ard]
> - Fix issue with corrupted patches [Ard]
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Sunny Wang <Sunny.Wang@arm.com>
> Cc: Jeff Booher-Kaeding <Jeff.Booher-Kaeding@arm.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
>
> Dimitrije Pavlov (3):
>   OvmfPkg/PlatformDxe: Check ExtractConfig and RouteConfig arguments
>   OvmfPkg/VirtioGpuDxe: Check QueryMode arguments
>   OvmfPkg/VirtioFsDxe: Check GetDriverName arguments
>

Thank you for the resend.

@Liming: these are all bug fixes that affect SCT results, so unless
there are any objections, I intend to merge these tomorrow (Tuesday).

Thanks,
Ard.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92444): https://edk2.groups.io/g/devel/message/92444
Mute This Topic: https://groups.io/mt/93040550/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-