]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Fix restorevol crash on corrupt nDumpTimes value
authorRuss Allbery <rra@stanford.edu>
Sat, 29 Jun 2013 21:27:55 +0000 (14:27 -0700)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 7 Oct 2015 10:18:06 +0000 (06:18 -0400)
commitc2005f1ff0052c3a77c39349551441962c100278
tree1d8e36af72d0b471d5d91c89b1dc467793ea2bfb
parentd359431504bfd543e6f38d41656a430b7b8fc2de
Fix restorevol crash on corrupt nDumpTimes value

If the number of dump times claimed in the volume header was greater
than MAXDUMPTIMES, restorevol would happily write over random stack
memory and crash.  Sanity-check the loaded value and cap it to
MAXDUMPTIMES with a warning.

Bug found by Mayhem and reported by Alexandre Rebert.

Reviewed-on: http://gerrit.openafs.org/10025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit d5fb2c2bdccedbd539cb2629cf918d5f37b82c7b)

Change-Id: I0b4718afd3c3330581ce5da875f9f8a83fe6b132
Reviewed-on: http://gerrit.openafs.org/11553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/volser/restorevol.c