summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-05-05 15:38:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-13 19:50:09 +0200
commit26c8b9a5fd541b146c696b5354d966a86fd7fdac (patch)
tree45909ca2f6b742530c12df04fe2b4d1674d93f95 /drivers/leds
parent121ed59565ed80023f7efbd49459eb1501b416b1 (diff)
ray_cs: Avoid reading past end of buffer
[ Upstream commit e48d661eb13f2f83861428f001c567fdb3f317e8 ] Using memcpy() from a buffer that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. In this case, the source was made longer, since it did not match the destination structure size. Additionally removes a needless cast. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds')
0 files changed, 0 insertions, 0 deletions