]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Fix buffer overflow when reading from pstore
authorAruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Thu, 8 Aug 2013 17:03:49 +0000 (22:33 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 9 Aug 2013 08:06:40 +0000 (18:06 +1000)
commitfe0a5776821bcb4f9dd6b00671d67fed3eeafc26
treefe4ceca869426702d81b5dbf0a924adbd9708725
parentec33943ecef8018d47b506a9afbc9312aed8ea38
powerpc/pseries: Fix buffer overflow when reading from pstore

When reading from pstore there is a buffer overflow during decompression
due to the header added in unzip_oops. Remove unzip_oops and call
pstore_decompress directly in nvram_pstore_read. Allocate buffer of size
report_length of the oops header as header will not be deallocated in pstore.
Since we have 'openssl' command line tool to decompress the compressed data,
dump the compressed data in case decompression fails instead of not dumping
anything.

Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/nvram.c