Extracted from a patch in Fedora. http://pkgs.fedoraproject.org/cgit/unzip.git/tree/unzip-6.0-heap-overflow-infloop.patch?id=d18f821e From bd150334fb4084f5555a6be26b015a0671cb5b74 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 22 Sep 2015 18:52:23 +0200 Subject: [PATCH 3/3] extract: prevent unsigned overflow on invalid input Suggested-by: Stefan Cornelius --- extract.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/extract.c b/extract.c index 29db027..b9ae667 100644 --- a/extract.c +++ b/extract.c @@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G__ numchunk, if (G.lrec.compression_method == STORED) { zusz_t csiz_decrypted = G.lrec.csize; - if (G.pInfo->encrypted) + if (G.pInfo->encrypted) { + if (csiz_decrypted <= 12) { + /* handle the error now to prevent unsigned overflow */ + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall(ErrUnzipNoFile), + LoadFarString(InvalidComprData), + LoadFarStringSmall2(Inflate))); + return PK_ERR; + } csiz_decrypted -= 12; + } if (G.lrec.ucsize != csiz_decrypted) { Info(slide, 0x401, ((char *)slide, LoadFarStringSmall2(WrnStorUCSizCSizDiff), -- 2.5.2 a3f9c00b303ef4815d892a47edc2e6'>diff
path: root/gnu/services/admin.scm
AgeCommit message (Expand)Author
2023-01-10services: unattended-upgrade: Add 'operating-system-expression' field....Giacomo Leidi
2022-08-01services: rottlog: More convenient default options for <log-rotation>....Ludovic Courtès
2022-08-01services: rottlog: Keep important /var/log files for 16 weeks....Ludovic Courtès
2022-04-09services: rottlog: Keep fewer "guix-daemon.log" files....Ludovic Courtès
2022-04-04services: Add 'log-cleanup-service-type'....Ludovic Courtès
2021-11-30services: Accept <inferior-package>s in lieu of <package>s....Tobias Geerinckx-Rice
2021-03-29services: rottlog: Add /var/log/mcron.log to '%default-rotations'....Ludovic Courtès
2020-08-24services: unattended-upgrade: Log output of the 'guix' commands....Ludovic Courtès
2020-08-24services: unattended-upgrade: Add 'operating-system-file' field....Ludovic Courtès
2020-07-27services: Add 'unattended-upgrade-service-type'....Ludovic Courtès
2020-05-06services: rottlog: Append '.gz' to rotated file....Brice Waegeneire