Bug 273417 - [patch] archivers/7-zip: Update to 23.00 or 23.01 (Security)
Summary: [patch] archivers/7-zip: Update to 23.00 or 23.01 (Security)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Max Brazhnikov
URL:
Keywords: patch, security
Depends on:
Blocks:
 
Reported: 2023-08-29 09:07 UTC by Fabian Wenk
Modified: 2024-02-16 21:46 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (makc)


Attachments
Patch 7-zip port from 22.01 to 23.01 (1.92 KB, patch)
2023-08-30 11:49 UTC, Fabian Wenk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Wenk 2023-08-29 09:07:37 UTC
According to the German news Heise.de [1] versions below 23.00 contain a very critical vulnerability. Unfortunately in the release notes for 7-zip 23.00 it was not mention. Heise does refer to "7-Zip SquashFS File Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability" [2].

 [1] https://www.heise.de/news/Jetzt-updaten-Hochriskante-Sicherheitsluecken-in-7-Zip-ermoeglichen-Codeschmuggel-9287669.html
 [2] https://www.zerodayinitiative.com/advisories/ZDI-23-1164/
Comment 1 Stephan Muhs 2023-08-29 19:20:14 UTC
Seconded, the issue affects all users of 7zip.
Comment 2 Fabian Wenk 2023-08-30 11:49:11 UTC
Created attachment 244467 [details]
Patch 7-zip port from 22.01 to 23.01

Adjusted Makefile and distinfo for 23.01, plus also files/patch-CPP_7zip_7zip__gcc.mak as it did not apply any more.

I did build and run it on FreeBSD 12.4/amd64, but not on anything other.
Comment 3 Stephan Muhs 2023-08-30 19:42:19 UTC
Patch applied and 7zip 23.01 builds fine on both 12.4 and 13.2 for me (amd64). Basic functionality works for me, no time yet to test in any depth.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-08-31 09:39:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=afb01763bb13cf2636e25932dbdfa2d2c228042d

commit afb01763bb13cf2636e25932dbdfa2d2c228042d
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2023-08-31 09:38:03 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2023-08-31 09:39:00 +0000

    archivers/7-zip: update to 23.01

    PR:             273417
    Submitted by:   Fabian Wenk

 archivers/7-zip/Makefile                           |  2 +-
 archivers/7-zip/distinfo                           |  6 +++---
 archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak | 12 +++++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)
Comment 5 Max Brazhnikov freebsd_committer freebsd_triage 2023-08-31 09:43:06 UTC
Thank you for patch and testing!
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2023-09-01 18:00:29 UTC
Not sure if there's interest but there's a meson build around that might be worth looking into for collaboration as it would probably reduce the amount of patches and be easier to maintain.

https://github.com/atomlong/7-zip/blob/master/meson.build

This is what Arch Linux uses in their repo fwiw.