diff options
author | Ross Lagerwall <ross.lagerwall@citrix.com> | 2024-07-17 17:20:16 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-07-26 14:33:09 -0700 |
commit | bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc (patch) | |
tree | 79da1b05ffcabe68a292aa1e0901280dc826bd31 /block | |
parent | d659b715e94ac039803d7601505d3473393fc0be (diff) | |
download | linux-stable-bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc.tar.gz linux-stable-bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc.tar.bz2 linux-stable-bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc.zip |
decompress_bunzip2: fix rare decompression failure
The decompression code parses a huffman tree and counts the number of
symbols for a given bit length. In rare cases, there may be >= 256
symbols with a given bit length, causing the unsigned char to overflow.
This causes a decompression failure later when the code tries and fails to
find the bit length for a given symbol.
Since the maximum number of symbols is 258, use unsigned short instead.
Link: https://lkml.kernel.org/r/20240717162016.1514077-1-ross.lagerwall@citrix.com
Fixes: bc22c17e12c1 ("bzip2/lzma: library support for gzip, bzip2 and lzma decompression")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Alain Knaff <alain@knaff.lu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions