reiser4: remove lzo compression security hole
PATCH 1/1 reiser4: remove lzo compression security hole
Switch reiser4 to use lzo1x_decompress_safe instead of lzo1x_decompress as otherwise it presents a security hole (lzo1x_decompress doesn't perform bounds checking on the decompressed data).
Signed-off-by Richard Purdie <[email protected]>
--- fs/reiser4/plugin/compress/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/reiser4/plugin/compress/compress.c +1 -1
@@ -319,7 +319,7 @@ lzo1_decompress(coa_t coa, __u8 * src_fiassert ("edward-851" , coa ==NULL );assert ("edward-852" , src_len !=0 ); - result =lzo1x_decompress (src_first, src_len, dst_first, &dstlen,NULL ); + result =lzo1x_decompress_safe (src_first, src_len, dst_first, &dstlen,NULL );if (result !=LZO_E_OK )warning ("edward-853" ,"lzo1x_1_decompress failed\n" ); *dst_len = dstlen;
Quoted 18 lines · Richard Purdie
Switch reiser4 to use
lzo1x_decompress_safeinstead oflzo1x_decompressas otherwise it presents a security hole (lzo1x_decompressdoesn't perform bounds checking on the decompressed data).Signed-off-by Richard Purdie <[email protected]>---
fs/reiser4/plugin/compress/compress.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-2.6.21/fs/reiser4/plugin/compress/compress.c
===================================================================
fs/reiser4/plugin/compress/compress.c lzo1_decompress(coa_t coa, __u8 * src_fi · line 325
Quoted 8 lines
fs/reiser4/plugin/compress/compress.c +1
-1@@ -319,7 +319,7 @@ lzo1_decompress(coa_t coa, __u8 * src_fiassert ("edward-851" , coa ==NULL );assert ("edward-852" , src_len !=0 ); - result =lzo1x_decompress (src_first, src_len, dst_first, &dstlen,NULL ); + result =lzo1x_decompress_safe (src_first, src_len, dst_first, &dstlen,NULL );if (result !=LZO_E_OK )warning ("edward-853" ,"lzo1x_1_decompress failed\n" ); *dst_len = dstlen;
Signed-off-by Edward Shishkin <[email protected]>