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:	Thu, 14 Aug 2014 10:12:29 -0300
From:	Henrique de Moraes Holschuh <hmh@....eng.br>
To:	Bill Davidsen <davidsen@....com>
Cc:	Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
	Fenghua Yu <fenghua.yu@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: BUG: early intel microcode update violating alignment rules

On Mon, 11 Aug 2014, Bill Davidsen wrote:
> Don't suppose you have anything in memory right after the microcode
> which you could put on the stack (15 bytes) slide the image up into
> alignment, load it, and put everything back. Haven't looked at the
> code or data, just tossing out an idea I used for something else
> back when.

Right after?  We don't know what will be there.  But we know what is right
before: there's enough bytes worth of microcode metadata header to align the
real microcode data to the previous 16-byte boundary.

This is a fix I should be fully capable of writing, actually.  But it will
be slower (two memcpy, two memove) and much nastier than the proper solution
using a scratch area (one memcpy).

That said, it is reported[1] that an Intel microcode update will take
anything from a couple hundred-thousand to several million cycles per
processor core.  I wouldn't lose any sleep over adding two 16-byte memcpy
and two ~32KiB memove to something that is already that expensive.  And it
will be easy to backport.

Anyway, I don't know enough to either add an initbss, or change the brk as
HPA hinted, or how easy would it be to backport that, so I will wait for
further directions.

Meanwhile, I prepared an iucode-tool v1.0.3 release that works around this
kernel issue for the benefit of the linux distros that use it[2].  It's at
https://gitorious.org/iucode-tool if anyone around here is interested.

[1] http://inertiawar.com/microcode/

[2] Debian, Ubuntu and their derivatives.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ