msm: kgsl: Add missing check for snapshot IB dump
During ringbuffer parsing, same IB can exist multiple times
but size validation happens only for the first time.
This leads to out of bound access if the subsequent sizes are
greater than the allocated size.
Add a check to make sure that requested size is within the
allocated range.
Backported to the FP2 kernel version 3.4.
Issue: SEC-2073
Bug: 138940226
Change-Id: Ie5d3c02c1669de2e6188821399e985f0991aa57c
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
(cherry picked from commit 63b1244daf4a9b965d4636ce2e67ff4555fff6c0)
1 file changed