Patch "efi/libstub: smbios: Use length member instead of record struct size" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    efi/libstub: smbios: Use length member instead of record struct size

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     efi-libstub-smbios-use-length-member-instead-of-reco.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1343d3e4df9955288f5596fafd3db4631c224296
Author: Ard Biesheuvel <ardb@xxxxxxxxxx>
Date:   Tue Feb 28 19:23:09 2023 +0100

    efi/libstub: smbios: Use length member instead of record struct size
    
    [ Upstream commit 34343eb06afc04af9178a9883d9354dc12beede0 ]
    
    The type 1 SMBIOS record happens to always be the same size, but there
    are other record types which have been augmented over time, and so we
    should really use the length field in the header to decide where the
    string table starts.
    
    Fixes: 550b33cfd4452968 ("arm64: efi: Force the use of ...")
    Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/efi/libstub/smbios.c b/drivers/firmware/efi/libstub/smbios.c
index 460418b7f5f5e..aadb422b9637d 100644
--- a/drivers/firmware/efi/libstub/smbios.c
+++ b/drivers/firmware/efi/libstub/smbios.c
@@ -36,7 +36,7 @@ const u8 *__efi_get_smbios_string(u8 type, int offset, int recsize)
 	if (status != EFI_SUCCESS)
 		return NULL;
 
-	strtable = (u8 *)record + recsize;
+	strtable = (u8 *)record + record->length;
 	for (int i = 1; i < ((u8 *)record)[offset]; i++) {
 		int len = strlen(strtable);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux