summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sysfs.c
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2016-05-11 02:57:32 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-16 08:05:47 +0200
commit1d1451655bad9a6a5fd7a42de68420069ce3bee3 (patch)
tree4758fb505baba109df90e6f75247c429e30a8940 /arch/powerpc/kernel/sysfs.c
parentpowerpc/mm: Ensure "special" zones are empty (diff)
downloadlinux-1d1451655bad9a6a5fd7a42de68420069ce3bee3.tar.xz
linux-1d1451655bad9a6a5fd7a42de68420069ce3bee3.zip
powerpc: Add array bounds checking to crash_shutdown_handlers
The array crash_shutdown_handles is an array of size CRASH_HANDLER_MAX+1 containing up to CRASH_HANDLER_MAX shutdown_handlers. It is assumed to be NULL terminated, which it is under normal circumstances. Array accesses in the functions crash_shutdown_unregister() and default_machine_crash_shutdown() rely on this NULL termination property when traversing this list and don't protect again out of bounds accesses. If the NULL terminator were somehow overwritten these functions could potentially access out of the bounds of the array. Shrink the array to size CRASH_HANDLER_MAX and implement explicit array bounds checking when accessing the elements of the crash_shutdown_handles[] array in crash_shutdown_unregister() and default_machine_crash_shutdown(). Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
0 files changed, 0 insertions, 0 deletions