Ross Lagerwall
a01900bb7d
decompress_bunzip2: fix rare decompression failure
...
commit bf6acd5d16057d7accbbb1bf7dc6d8c56eeb4ecc upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 16b92b031b4da174342bd909130731c55f20c7ea)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
2024-10-10 10:27:24 +00:00
..
2017-11-02 11:10:55 +01:00
2022-06-25 11:46:27 +02:00
2020-11-10 10:29:03 +01:00
2017-10-03 17:54:25 -07:00
2017-11-02 11:10:55 +01:00
2023-09-23 10:47:04 +02:00
2022-04-20 09:08:12 +02:00
2019-07-31 07:28:30 +02:00
2021-11-26 11:40:28 +01:00
2020-06-25 15:41:57 +02:00
2017-08-15 09:02:08 -07:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:52:52 +01:00
2022-06-06 08:20:56 +02:00
2017-07-14 15:05:13 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2020-01-29 15:02:39 +01:00
2019-04-05 22:31:33 +02:00
2021-05-22 10:57:32 +02:00
2017-11-02 11:10:55 +01:00
2022-06-25 11:46:31 +02:00
2017-11-02 11:10:55 +01:00
2023-08-30 16:35:15 +02:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:49 -07:00
2017-11-02 11:10:55 +01:00
2023-06-14 10:35:25 +02:00
2017-11-02 11:10:55 +01:00
2017-06-09 11:52:07 +02:00
2020-10-29 09:07:10 +01:00
2017-11-02 11:10:55 +01:00
2020-11-10 10:29:04 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-11-13 11:14:51 -08:00
2023-08-11 11:33:47 +02:00
2017-11-02 11:10:55 +01:00
2024-10-10 10:27:24 +00:00
2017-11-02 11:10:55 +01:00
2021-07-20 16:17:51 +02:00
2021-11-26 11:40:28 +01:00
2017-11-02 11:10:55 +01:00
2020-01-27 14:46:39 +01:00
2017-10-12 17:16:40 +01:00
2019-04-20 09:15:07 +02:00
2022-06-14 16:53:45 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-11-12 19:18:01 +01:00
2024-06-03 12:47:30 +00:00
2017-11-02 11:10:55 +01:00
2018-05-09 09:51:54 +02:00
2017-07-10 16:32:35 -07:00
2017-08-10 15:54:06 -07:00
2020-04-24 08:00:31 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-01-12 20:09:06 +01:00
2017-02-24 17:46:57 -08:00
2017-02-24 17:46:57 -08:00
2022-05-12 12:17:06 +02:00
2017-11-02 11:10:55 +01:00
2022-07-12 16:27:29 +02:00
2017-11-02 11:10:55 +01:00
2019-04-05 22:31:24 +02:00
2018-12-17 09:28:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-08-17 21:01:11 +02:00
2022-02-23 11:57:35 +01:00
2017-11-02 11:10:55 +01:00
2017-03-02 08:42:38 +01:00
2017-11-02 11:10:55 +01:00
2022-03-23 09:01:34 +01:00
2022-06-25 11:46:40 +02:00
2018-02-16 20:23:04 +01:00
2017-05-16 08:44:22 -03:00
2020-01-27 14:46:44 +01:00
2018-10-03 17:00:48 -07:00
2021-05-22 10:57:41 +02:00
2023-11-08 11:21:07 +01:00
2021-07-20 16:17:33 +02:00
2021-07-20 16:17:33 +02:00
2017-06-08 17:36:03 +08:00
2017-02-24 17:46:56 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2022-06-25 11:46:27 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2021-05-22 10:57:39 +02:00
2018-09-05 09:26:35 +02:00
2022-06-14 16:54:01 +02:00
2023-01-18 09:26:10 +01:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:08:01 +01:00
2023-01-18 09:26:04 +01:00
2017-02-03 16:35:42 -05:00
2017-11-02 11:10:55 +01:00
2017-03-02 08:42:34 +01:00
2017-03-22 19:18:43 -07:00
2017-03-02 08:42:27 +01:00
2017-01-23 09:17:12 +01:00
2023-08-11 11:33:32 +02:00
2022-06-25 11:46:36 +02:00
2022-09-05 10:25:04 +02:00
2017-11-02 11:10:55 +01:00
2018-12-17 09:28:55 +01:00
2017-09-08 18:26:48 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-04-03 06:25:09 +02:00
2019-05-31 06:47:10 -07:00
2020-11-05 11:06:58 +01:00
2021-07-20 16:17:47 +02:00
2022-06-25 11:46:27 +02:00
2017-02-22 16:41:30 -08:00
2022-06-25 11:46:39 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2024-05-31 12:57:28 +00:00
2017-09-13 18:53:16 -07:00
2021-02-23 14:00:30 +01:00
2020-06-20 10:24:58 +02:00
2020-06-20 10:24:58 +02:00
2022-07-02 16:18:11 +02:00
2017-11-02 11:10:55 +01:00
2018-05-22 18:53:58 +02:00
2021-10-17 10:08:32 +02:00
2019-01-13 10:01:07 +01:00
2023-08-30 16:35:13 +02:00
2018-12-08 13:03:35 +01:00
2020-02-14 16:32:08 -05:00
2022-04-20 09:08:21 +02:00
2017-05-08 17:15:10 -07:00
2017-02-26 11:03:38 -05:00
2017-07-25 12:35:23 -07:00
2017-01-09 13:58:57 -05:00
2017-05-08 17:15:10 -07:00
2017-07-12 16:26:00 -07:00
2017-05-01 09:36:30 +02:00
2017-07-21 09:38:30 +02:00
2021-10-09 14:09:46 +02:00
2023-08-11 11:33:35 +02:00
2017-10-22 03:14:07 +01:00
2017-10-22 03:14:07 +01:00
2023-09-23 10:46:52 +02:00
2023-09-23 10:46:52 +02:00
2017-11-02 11:10:55 +01:00
2023-02-25 11:50:31 +01:00
2017-06-05 16:59:05 +02:00
2021-07-20 16:17:33 +02:00
2017-11-02 11:10:55 +01:00
2017-08-15 09:02:07 -07:00