lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jul 2022 15:41:20 +0000
From:   "Kani, Toshi" <toshi.kani@....com>
To:     Borislav Petkov <bp@...en8.de>
CC:     "rrichter@...vell.com" <rrichter@...vell.com>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "Elliott, Robert (Servers)" <elliott@....com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Borislav Petkov" <bp@...e.de>
Subject: RE: [PATCH] EDAC/ghes: Fix buffer overflow in ghes_edac_register()

Borislav Petkov wrote:
> On Tue, Jul 19, 2022 at 04:01:24PM -0600, Toshi Kani wrote:
> > The following buffer overflow BUG was observed on an HPE system.
> > ghes_edac_register() called strlen() on an uninitialized label, which 
> > had non-zero values from krealloc_array().
> > Change dimm_setup_label() to always initialize the label.
>
> Do we also know why dmi_memdev_name() doesn't give bank and/or device?

Yes.

> SMBIOS handle wrong?

SMBIOS handle is correct.

In dimm_setup_label(), *device is set but *bank is null (dmi_empty_string).
*bank is set from SMBIOS type 17 Bank Locator, offset 11h.  This value is
set to 0x0 (null string) on this system, as shown below.

Handle 0x0020, DMI type 17, 84 bytes
Memory Device
        Array Handle: 0x0013
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 32 GB
        Form Factor: DIMM
        Set: None
        Locator: PROC 1 DIMM 1        <===== device
        Bank Locator: Not Specified   <===== bank
        ....

Handle 0x0020, DMI type 17, 84 bytes
        Header and Data:
                11 54 20 00 13 00 FE FF 48 00 40 00 FF 7F 09 00
                01 00 1A 80 20 75 0B 02 00 00 03 02 00 80 00 00
                   ^^
                75 0B B0 04 B0 04 B0 04 03 08 00 00 89 83 00 00
                00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                00 00 00 00
        Strings:
                50 52 4F 43 20 31 20 44 49 4D 4D 20 31 00
                PROC 1 DIMM 1
                55 4E 4B 4E 4F 57 4E 00
                UNKNOWN
                4E 4F 54 20 41 56 41 49 4C 41 42 4C 45 00
                NOT AVAILABLE

Thanks,
Toshi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ