]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: Sigma: Prevent out of bounds memory access
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 28 Nov 2011 08:44:14 +0000 (09:44 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 29 Nov 2011 11:53:53 +0000 (11:53 +0000)
commit241eb9538fea594924f4d3fd374e28f9c51fa631
treee4d9d630d4200a40bcc96b2a168828f8fb4ed1df
parente177294e423b59bda3480098e11cb477ce9164f4
firmware: Sigma: Prevent out of bounds memory access

The SigmaDSP firmware loader currently does not perform enough boundary size
checks when processing the firmware. As a result it is possible that a
malformed firmware can cause an out of bounds memory access.

This patch adds checks which ensure that both the action header and the payload
are completely inside the firmware data boundaries before processing them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
drivers/firmware/sigma.c
include/linux/sigma.h