Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Maciej S. Szmigiero
On 11.03.2018 10:59, Ingo Molnar wrote: > > * Maciej S. Szmigiero wrote: > >> Currently, it is very easy to make the AMD microcode update driver crash >> or spin on a malformed microcode file since it does very little >> consistency checking on data loaded from such

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Maciej S. Szmigiero
On 11.03.2018 10:59, Ingo Molnar wrote: > > * Maciej S. Szmigiero wrote: > >> Currently, it is very easy to make the AMD microcode update driver crash >> or spin on a malformed microcode file since it does very little >> consistency checking on data loaded from such file. >> >> This commit

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Ingo Molnar
* Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. > > This commit introduces various checks,

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-11 Thread Ingo Molnar
* Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. > > This commit introduces various checks, mostly on length-type

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 17:46, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 05:16:40PM +0100, Maciej S. Szmigiero wrote: (..) >> There is no container file at all for family 17h (Zen) so >> distributions like OpenSUSE that include this file must have gotten it >> from some other source > > Or maybe

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 17:46, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 05:16:40PM +0100, Maciej S. Szmigiero wrote: (..) >> There is no container file at all for family 17h (Zen) so >> distributions like OpenSUSE that include this file must have gotten it >> from some other source > > Or maybe

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 05:16:40PM +0100, Maciej S. Szmigiero wrote: > To make sure that it is clear what this patch is about: I know what you're trying to do but it seems you don't want to listen. So let me try one last time to clear your confusion. > It *isn't* about verifying the actual

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 05:16:40PM +0100, Maciej S. Szmigiero wrote: > To make sure that it is clear what this patch is about: I know what you're trying to do but it seems you don't want to listen. So let me try one last time to clear your confusion. > It *isn't* about verifying the actual

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 01:34, Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. > > This commit introduces various checks, mostly on

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 01:34, Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. > > This commit introduces various checks, mostly on

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 14:12, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 01:26:00PM +0100, Maciej S. Szmigiero wrote: >> Without them, it is easy to crash the driver when just playing with >> microcode files > > You're not supposed to play with the microcode files. If you do and > something breaks,

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 14:12, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 01:26:00PM +0100, Maciej S. Szmigiero wrote: >> Without them, it is easy to crash the driver when just playing with >> microcode files > > You're not supposed to play with the microcode files. If you do and > something breaks,

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 01:26:00PM +0100, Maciej S. Szmigiero wrote: > Without them, it is easy to crash the driver when just playing with > microcode files You're not supposed to play with the microcode files. If you do and something breaks, you get to keep the pieces. If the official microcode

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 01:26:00PM +0100, Maciej S. Szmigiero wrote: > Without them, it is easy to crash the driver when just playing with > microcode files You're not supposed to play with the microcode files. If you do and something breaks, you get to keep the pieces. If the official microcode

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 10:18, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 01:34:45AM +0100, Maciej S. Szmigiero wrote: >> Currently, it is very easy to make the AMD microcode update driver crash >> or spin on a malformed microcode file since it does very little >> consistency checking on data loaded

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Maciej S. Szmigiero
On 10.03.2018 10:18, Borislav Petkov wrote: > On Sat, Mar 10, 2018 at 01:34:45AM +0100, Maciej S. Szmigiero wrote: >> Currently, it is very easy to make the AMD microcode update driver crash >> or spin on a malformed microcode file since it does very little >> consistency checking on data loaded

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 01:34:45AM +0100, Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. Sorry but if one has enough

Re: [PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-10 Thread Borislav Petkov
On Sat, Mar 10, 2018 at 01:34:45AM +0100, Maciej S. Szmigiero wrote: > Currently, it is very easy to make the AMD microcode update driver crash > or spin on a malformed microcode file since it does very little > consistency checking on data loaded from such file. Sorry but if one has enough

[PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-09 Thread Maciej S. Szmigiero
Currently, it is very easy to make the AMD microcode update driver crash or spin on a malformed microcode file since it does very little consistency checking on data loaded from such file. This commit introduces various checks, mostly on length-type fields, so all corrupted microcode files are

[PATCH] x86/microcode/AMD: check microcode file sanity before loading it

2018-03-09 Thread Maciej S. Szmigiero
Currently, it is very easy to make the AMD microcode update driver crash or spin on a malformed microcode file since it does very little consistency checking on data loaded from such file. This commit introduces various checks, mostly on length-type fields, so all corrupted microcode files are