]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2019 18:42:51 +0000 (11:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Oct 2019 18:42:51 +0000 (11:42 -0700)
added patches:
efi-tpm-fix-sanity-check-of-unsigned-tbl_size-being-less-than-zero.patch

queue-5.3/efi-tpm-fix-sanity-check-of-unsigned-tbl_size-being-less-than-zero.patch [new file with mode: 0644]
queue-5.3/series

diff --git a/queue-5.3/efi-tpm-fix-sanity-check-of-unsigned-tbl_size-being-less-than-zero.patch b/queue-5.3/efi-tpm-fix-sanity-check-of-unsigned-tbl_size-being-less-than-zero.patch
new file mode 100644 (file)
index 0000000..ecbb8eb
--- /dev/null
@@ -0,0 +1,41 @@
+From be59d57f98065af0b8472f66a0a969207b168680 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Tue, 8 Oct 2019 11:01:53 +0100
+Subject: efi/tpm: Fix sanity check of unsigned tbl_size being less than zero
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit be59d57f98065af0b8472f66a0a969207b168680 upstream.
+
+Currently the check for tbl_size being less than zero is always false
+because tbl_size is unsigned. Fix this by making it a signed int.
+
+Addresses-Coverity: ("Unsigned compared against 0")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Cc: Jerry Snitselaar <jsnitsel@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: kernel-janitors@vger.kernel.org
+Cc: linux-efi@vger.kernel.org
+Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
+Link: https://lkml.kernel.org/r/20191008100153.8499-1-colin.king@canonical.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/firmware/efi/tpm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firmware/efi/tpm.c
++++ b/drivers/firmware/efi/tpm.c
+@@ -40,7 +40,7 @@ int __init efi_tpm_eventlog_init(void)
+ {
+       struct linux_efi_tpm_eventlog *log_tbl;
+       struct efi_tcg2_final_events_table *final_tbl;
+-      unsigned int tbl_size;
++      int tbl_size;
+       int ret = 0;
+       if (efi.tpm_log == EFI_INVALID_TABLE_ADDR) {
index 89f793fce83ed44d6541e84890ac2fd707a1fb8f..dfbe158f864ff9b276fcb0e08748233517307582 100644 (file)
@@ -108,3 +108,4 @@ hwmon-fix-hwmon_p_min_alarm-mask.patch
 mtd-rawnand-au1550nd-fix-au_read_buf16-prototype.patch
 x86-asm-fix-mwaitx-c-state-hint-value.patch
 io_uring-only-flush-workqueues-on-fileset-removal.patch
+efi-tpm-fix-sanity-check-of-unsigned-tbl_size-being-less-than-zero.patch