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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jul 2017 11:11:05 +0200
From:   Christian Kellner <ckellner@...hat.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Andreas Noever <andreas.noever@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <yehezkel.bernat@...el.com>,
        Lukas Wunner <lukas@...ner.de>,
        Amir Levy <amir.jer.levy@...el.com>,
        Andy Lutomirski <luto@...nel.org>, Mario.Limonciello@...l.com,
        Jared.Dominguez@...l.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org, Peter FP1 Zhang <zhangfp1@...ovo.com>
Subject: Re: [PATCH v4 00/27] Thunderbolt security levels and NVM firmware
 upgrade

Hi Mika,


> I've seen this once on Alpine Ridge LP (which you have here) where the
> DROM contents of the older NVM image listed too many ports. Can you 
> try
> if the below patch helps?
You were right. Patch works fine, and I indeed see the expected 
warnings in
the logs:

[  102.739663] thunderbolt 0000:03:00.0: 0: DROM has too many entries 6 
(expected 5)
[  102.739665] thunderbolt 0000:03:00.0: 0: DROM has too many entries 7 
(expected 5)
[  102.739667] thunderbolt 0000:03:00.0: 0: DROM has too many entries 8 
(expected 5)
[  102.739668] thunderbolt 0000:03:00.0: 0: DROM has too many entries 9 
(expected 5)
[  102.739669] thunderbolt 0000:03:00.0: 0: DROM has too many entries 
10 (expected 5)
[  102.739670] thunderbolt 0000:03:00.0: 0: DROM has too many entries 
11 (expected 5)

Thanks a lot,
Christian

> diff --git a/drivers/thunderbolt/eeprom.c 
> b/drivers/thunderbolt/eeprom.c
> index 996c6e2..bdf7f80 100644
> --- a/drivers/thunderbolt/eeprom.c
> +++ b/drivers/thunderbolt/eeprom.c
> @@ -333,6 +333,12 @@ static int tb_drom_parse_entry_port(struct 
> tb_switch *sw,
>  	int res;
>  	enum tb_port_type type;
> 
> +	if (header->index > sw->config.max_port_number) {
> +		tb_sw_warn(sw, "DROM has too many entries %u (expected %u)\n",
> +			   header->index, sw->config.max_port_number);
> +		return 0;
> +	}
> +
>  	port = &sw->ports[header->index];
>  	port->disabled = header->port_disabled;
>  	if (port->disabled)

Tested-by: Christian Kellner <christian@...lner.me>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ