Messages in this thread | | | Date | Tue, 28 Dec 2010 00:28:20 -0200 | From | Henrique de Moraes Holschuh <> | Subject | Re: [tip:x86/urgent] x86/microcode: Fix double vfree() and remove redundant pointer checks before vfree() |
| |
On Mon, 27 Dec 2010, tip-bot for Jesper Juhl wrote: > In arch/x86/kernel/microcode_intel.c::generic_load_microcode() > we have this: > > while (leftover) { > ... > if (get_ucode_data(mc, ucode_ptr, mc_size) || > microcode_sanity_check(mc) < 0) { > vfree(mc); > break; > } > ... > } > > if (mc) > vfree(mc);
Which is trivial to trigger from userspace, fortunately limited to root in any sane distro (and by default).
Please send it to -stable after it gets merged in mainline and is deemed safe...
The Intel microcode driver will also accept a bogus microcode which has a valid header, but all zeros for the cyphertext. This is a design defect on the current Intel microcode format, but can be worked around by the driver if one assumes such a cyphertext will never be valid (seems like a safe assumption). I sure hope the processors will reject that kind of bogosity even if the kernel doesn't and tries to upload it, though... I was not crazy enough to try.
-- "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
| |