efivars: Improve variable validation
authorMatthew Garrett <mjg@redhat.com>
Thu, 3 May 2012 20:50:46 +0000 (16:50 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 May 2012 00:19:19 +0000 (17:19 -0700)
commit54b3a4d311c98ad94b737802a8b5f2c8c6bfd627
treef31c73c1330a04beb085a1c30a18b102684ef8ae
parentfec6c20b570bcf541e581fc97f2e0cbdb9725b98
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