• # Linux 4.14.12

    Posté par . En réponse à la dépêche Deux failles critiques : Meltdown et Spectre. Évalué à 8.

    Il y a quelques jours (2 janvier) sortait le noyau 4.14.11, introduisant KPTI comme protection contre Meltdown.

    Le noyau 4.14.12 est sorti hier (5 janvier), incluant notamment :
    – le patch désactivant KPTI sur les AMD, célèbre pour sa description qui a vendu la mèche concernant Meltdown (alors que les patchs précédents avaient volontairement des descriptions absconses) ;
    – quelques correctifs concernant KPTI.

    Extrait du changelog concernant le patch pour les AMD :

    commit 151d7039757b71ebd9d170af0944562f51149372
    Author: Tom Lendacky <thomas.lendacky@amd.com>
    Date: Tue Dec 26 23:43:54 2017 -0600
     x86/cpu, x86/pti: Do not enable PTI on AMD processors
     commit 694d99d40972f12e59a3696effee8a376b79d7c8 upstream.
     AMD processors are not subject to the types of attacks that the kernel
     page table isolation feature protects against. The AMD microarchitecture
     does not allow memory references, including speculative references, that
     access higher privileged data when running in a lesser privileged mode
     when that access would result in a page fault.
     Disable page table isolation by default on AMD processors by not setting
     the X86_BUG_CPU_INSECURE feature, which controls whether X86_FEATURE_PTI
     is set.
    

    Extrait du changelog concernant l’un des patchs correctifs (contre une erreur qui d’après la description peut dans le pire des cas causer un crash du noyau) :

    commit 7930cb29fb5feb6d18ffc20a83a1d3e5afac7a8a
    Author: Thomas Gleixner <tglx@linutronix.de>
    Date: Wed Jan 3 19:52:04 2018 +0100
     x86/pti: Switch to kernel CR3 at early in entry_SYSCALL_compat()
     commit d7732ba55c4b6a2da339bb12589c515830cfac2c upstream.
     The preparation for PTI which added CR3 switching to the entry code
     misplaced the CR3 switch in entry_SYSCALL_compat().
     With PTI enabled the entry code tries to access a per cpu variable after
     switching to kernel GS. This fails because that variable is not mapped to
     user space. This results in a double fault and in the worst case a kernel
     crash.
     Move the switch ahead of the access and clobber RSP which has been saved
     already.
    

    « Le fascisme c’est la gangrène, à Washington comme en Russie. » — adapté de Renaud, Hexagone