efivars: Improve variable validation
authorMatthew Garrett <mjg@redhat.com>
Thu, 3 May 2012 20:50:46 +0000 (16:50 -0400)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 14 May 2012 13:34:35 +0000 (18:34 +0530)
commit583538e8d92e00e98f917ffbfac72c71ec739739
treead4cf1123bf44ac7302df13a3bacf77dab7ec252
parent94228630ba6233c24df0984d9dfa36fb3a9aae44
efivars: Improve variable validation

Ben Hutchings pointed out that the validation in efivars was inadequate -
most obviously, an entry with size 0 would server as a DoS against the
kernel. Improve this based on his suggestions.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/firmware/efivars.c