Skip to contentSkip to conversation

Update to minilzo-2.08

PATCH In review Javier Martinez Canillas 2 participants 2 messages Jan 20, 2020 – Jan 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Update to minilzo-2.08

From: Peter Jones <[email protected]>

This patch updates the miniLZO library to a newer version, which among other things fixes "CVE-2014-4607 - lzo: lzo1x_decompress_safe() integer overflow" that is present in the current used in GRUB.

It also updates the "GRUB Developers Manual", to mention that the library is used and describes the process to update it to a newer release when needed.

Resolves: http://savannah.gnu.org/bugs/?42635

---
Hello,

This is a big patch but it just updates to a newer miniLZO version to prevent the mentioned CVE that's present in the current GRUB version. This patch has been in our package for about 5 years and we found no issues with it.

Best regards,
Javier

Changes in v2:
- Document in docs/grub-dev.texi the procedure to update minilzo. Suggested by Daniel Kiper.

 docs/grub-dev.texi              |   20 +
 grub-core/lib/minilzo/lzoconf.h |  216 +-
 grub-core/lib/minilzo/lzodefs.h | 2450 ++++++++++++++-----
 grub-core/lib/minilzo/minilzo.c | 3953 +++++++++++++++++++++----------
 grub-core/lib/minilzo/minilzo.h |   21 +-
 5 files changed, 4650 insertions(+), 2010 deletions(-)
docs/grub-dev.texi +20 -0
index df2350be0a3..8378730943e 100644
@@ -491,6 +491,7 @@ to update it.
 @menu
 * Gnulib::
 * jsmn::
+* minilzo::
 @end menu
 
 @node Gnulib
@@ -559,6 +560,25 @@ curl -L https://raw.githubusercontent.com/zserge/jsmn/v1.1.0/jsmn.h \
     -o grub-core/lib/json/jsmn.h
 @end example
 
+@node minilzo
+@section minilzo
+
+miniLZO is a very lightweight subset of the LZO library intended for easy
+inclusion in other projects. It is generated automatically from the LZO
+source code and contains the most important LZO functions.
+
+To upgrade to a new version of the miniLZO library, download the release
+tarball and copy the files into the target directory:
+
+@example
+curl -L -O http://www.oberhumer.com/opensource/lzo/download/minilzo-2.08.tar.gz
+tar -zxf minilzo-2.08.tar.gz
+rm minilzo-2.08/testmini.c
+rm -r grub-core/lib/minilzo/*
+cp minilzo-2.08/*.[hc] grub-core/lib/minilzo
+rm -r minilzo-2.08*
+@end example
+
 @node Porting
 @chapter Porting
 
grub-core/lib/minilzo/lzoconf.h +107 -109

322 lines not on this page · raw message

grub-core/lib/minilzo/lzodefs.h +1798 -652

2,646 lines not on this page · raw message

grub-core/lib/minilzo/minilzo.c +2722 -1231

3,953 lines not on this page · raw message

grub-core/lib/minilzo/minilzo.h +3 -18
index 74fefa9fe20..79374546748 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.23.0

Part of the diff is not shown here. View the raw message.

Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Javier Martinez Canillas

From: Peter Jones <[email protected]>

This patch updates the miniLZO library to a newer version, which among other things fixes "CVE-2014-4607 - lzo: lzo1x_decompress_safe() integer overflow" that is present in the current used in GRUB.

Quoted 7 lines

It also updates the "GRUB Developers Manual", to mention that the library is used and describes the process to update it to a newer release when needed.

Resolves: http://savannah.gnu.org/bugs/?42635

Daniel