e-m-b-a / emba

EMBA - The firmware security analyzer
https://www.securefirmware.de
GNU General Public License v3.0
2.49k stars 223 forks source link

fix zlib (unzip) version string #1164

Closed gluesmith2021 closed 1 month ago

gluesmith2021 commented 1 month ago

bug fix

Des not search for CVEs for zlib if it is detected with the unzip version string, because the leading space in the matched string is kept in the name:version replacement string.

In s09_firmware_base_version_check.txt

[+] Version information found  unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll in binary logs/firmware/patool_extraction/disk3/opt/navi/EBNavi/libBusinessLogic.so (-rwxrwxr-x root root) (license: Zlib) (static).
[+] Version information found  unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll in binary logs/firmware/patool_extraction/disk3/opt/navi/asia_navi/apnnavc (-rwxrwxr-x root root) (license: Zlib) (static).

In f20_vul_aggregator.txt

[-] WARNING: Broken version identifier found:  zlib:1.0.1

Then F20 does not proceed any further.

Now with the extra leading space removed, it correctly identifies zlib and finds CVEs:

[*] Vulnerability details for zlib / version 1.0.1 / source STAT:

    BIN NAME            :   BIN VERS    :   CVE ID            :  CVSS VALUE : EPSS :   SOURCE         :   EXPLOIT
    zlib                :   1.0.1       :   CVE-2018-25032    :   7.5       :  NA  :   STAT           :   No exploit available
    zlib                :   1.0.1       :   CVE-2002-0059     :   9.8       :  NA  :   STAT           :   No exploit available
    zlib                :   1.0.1       :   CVE-2022-37434    :   9.8       :  NA  :   STAT           :   No exploit available
    zlib                :   1.0.1       :   CVE-2023-6992     :   5.5       :  NA  :   STAT           :   No exploit available
    zlib                :   1.0.1       :   CVE-2023-45853    :   9.8       :  NA  :   STAT           :   No exploit available

[+] Found 5 CVEs and 0 exploits (including POC's) in zlib with version 1.0.1 (source STAT).

No