Re: [PATCH 3.4 177/177] x86/tls: Validate TLS entries to protect espfix

From: Willy Tarreau
Date: Wed Jan 28 2015 - 01:52:24 EST


Hi Li,

On Wed, Jan 28, 2015 at 12:10:35PM +0800, lizf@xxxxxxxxxx wrote:
> From: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
>
> 3.4.106-rc1 review patch. If anyone has any objections, please let me know.
>
> ------------------
>
>
> commit 41bdc78544b8a93a9c6814b8bbbfef966272abbe upstream.
>
> Installing a 16-bit RW data segment into the GDT defeats espfix.
> AFAICT this will not affect glibc, Wine, or dosemu at all.
>
> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> Acked-by: H. Peter Anvin <hpa@xxxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: security@xxxxxxxxxx <security@xxxxxxxxxx>
> Cc: Willy Tarreau <w@xxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> Signed-off-by: Zefan Li <lizefan@xxxxxxxxxx>

This patch has introduced a few minor regressions for which Andy has
provided fixes already pending in latest stable previews, so maybe it
could make sense to either pick them as well or delay all of them for
another round. Greg has queued them in his latest preview if you are
interested (eg: 19/32 and 20/32 for 3.10.67) :

- e30ab18 ("x86, tls, ldt: Stop checking lm in LDT_empty")
- 3669ef9 ("x86, tls: Interpret an all-zero struct user_desc as "no segment"")

Best regards,
Willy

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/