Accepting request 864074 from hardware

- Add patch fixing bsc#1178442 bsc#1177992
  * acpi-pmtt-fix-infinite-loops-when-length-is-incorrectly-zero.diff

OBS-URL: https://build.opensuse.org/request/show/864074
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fwts?expand=0&rev=54
This commit is contained in:
Dominique Leuenberger 2021-01-18 14:22:05 +00:00 committed by Git OBS Bridge
commit 65db26fa44
3 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,36 @@
Index: fwts-20.12.00/src/acpi/pmtt/pmtt.c
===================================================================
--- fwts-20.12.00.orig/src/acpi/pmtt/pmtt.c
+++ fwts-20.12.00/src/acpi/pmtt/pmtt.c
@@ -117,6 +117,14 @@ static void pmtt_controller_test(fwts_fr
offset += sizeof(fwts_acpi_table_pmtt_domain) * entry->domain_count;
header = (fwts_acpi_table_pmtt_header *) (((char *) entry) + offset);
while (offset < entry->header.length) {
+
+ if (header->length == 0) {
+ fwts_failed(fw, LOG_LEVEL_CRITICAL,
+ "PMTTBadSubtableLength",
+ "PMTT Controller has a subtable with zero length");
+ break;
+ }
+
if (header->type == FWTS_ACPI_PMTT_TYPE_DIMM) {
pmtt_physical_component_test(fw, (fwts_acpi_table_pmtt_physical_component *) header, passed);
} else {
@@ -145,7 +153,16 @@ static void pmtt_socket_test(fwts_framew
offset = sizeof(fwts_acpi_table_pmtt_socket);
header = (fwts_acpi_table_pmtt_header *) (((char *) entry) + offset);
+
while (offset < entry->header.length) {
+
+ if (header->length == 0) {
+ fwts_failed(fw, LOG_LEVEL_CRITICAL,
+ "PMTTBadSubtableLength",
+ "PMTT Socket has a subtable with zero length");
+ break;
+ }
+
if (header->type == FWTS_ACPI_PMTT_TYPE_CONTROLLER) {
pmtt_controller_test(fw, (fwts_acpi_table_pmtt_controller *) header, passed);
} else {

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 18 08:25:34 UTC 2021 - Martin Pluskal <mpluskal@suse.com>
- Add patch fixing bsc#1178442 bsc#1177992
* acpi-pmtt-fix-infinite-loops-when-length-is-incorrectly-zero.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 18 06:45:25 UTC 2020 - Martin Pluskal <mpluskal@suse.com> Fri Dec 18 06:45:25 UTC 2020 - Martin Pluskal <mpluskal@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package fwts # spec file for package fwts
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -28,6 +28,8 @@ Source0: https://fwts.ubuntu.com/release/%{name}-V%{version}.tar.gz
Patch1: fwts-no-compiletime.patch Patch1: fwts-no-compiletime.patch
# PATCH-FIX-OPENSUSE fwts-fix-non-acpi.patch # PATCH-FIX-OPENSUSE fwts-fix-non-acpi.patch
Patch2: fwts-fix-non-acpi.patch Patch2: fwts-fix-non-acpi.patch
# PATCH-FIX-UPSTREAM acpi-pmtt-fix-infinite-loops-when-length-is-incorrectly-zero.diff
Patch3: acpi-pmtt-fix-infinite-loops-when-length-is-incorrectly-zero.diff
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: bison BuildRequires: bison