Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hughsie/zhangyoufu #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must obtained this file from WinSxS directory. I found two samples that match your date & time.

You can find win32 FILETIME in _manifest_.cix.xml file, and a little-endian uint64 after the PA30 magic string in the delta file.

This one contains x86_microsoft-windows-s..boot-firmwareupdate_31bf3856ad364e35_6.2.9200.16895_none_b16766b7d6f0546c with 130419008663852453 (2014-04-13 22:14:26).

This one contains amd64_microsoft-windows-s..boot-firmwareupdate_31bf3856ad364e35_6.2.9200.16895_none_0d86023b8f4dc5a2 with 130419008688273408 (2014-04-13 22:14:28).

I would prefer to use KB / UEFI Forum release date, instead of mtime of dbxupdate.bin file which may be days or months before the release date. Every single KB comes with many msu/cab with different mtime. It's messy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that works for me. Would you mind submitting a pull request to this branch to fix this up please?

File renamed without changes.
Binary file added DBXUpdate-20140227.ia32+x64.bin
Binary file not shown.
Binary file added DBXUpdate-20140513.ia32+x64.bin
Binary file not shown.
File renamed without changes.
Binary file added DBXUpdate-20200211.ia32+x64+arm+aa64.bin
Binary file not shown.
Binary file added DBXUpdate-20200211.x64.bin
Binary file not shown.
Binary file added DBXUpdate-20201012.x64.bin
Binary file not shown.
53 changes: 53 additions & 0 deletions DBXUpdate-20201012.x64.metainfo.xml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update removed 61341e07697978220ea61e85dcd2421343f2c1bf35cc5b8d0ad2f0226f391479, an x64 entry introduced in DBXUpdate-20200729.x64.bin, which may worth mention.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, CVE-2023-28005 is not related to this release.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022 Richard Hughes <[email protected]> -->
<component type="firmware">
<id>org.linuxfoundation.dbx.x64.firmware</id>
<name>Secure Boot dbx</name>
<name_variant_suffix>x64</name_variant_suffix>
<summary>UEFI Secure Boot Forbidden Signature Database</summary>
<description>
<p>
Updating the UEFI dbx prevents starting EFI binaries with known security issues.
</p>
</description>
<provides>
<!-- Microsoft Corporation KEK CA 2011 -
UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_X64 -->
<firmware type="flashed">f8ba2887-9411-5c36-9cee-88995bb39731</firmware>
</provides>
<url type="homepage">https://uefi.org/revocationlistfile</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>proprietary</project_license>
<developer_name>Microsoft Corporation</developer_name>
<releases>
<!-- for the version use `fwupdtool firmware-parse foo.bin efi-signature-list` -->
<release urgency="high" version="183" date="2020-10-12">
<checksum filename="DBXUpdate-20201012.x64.bin" target="content"/>
<description>
<p>
An insecure version of software from Cisco has been added to the list of forbidden
signatures due to a discovered security problem.
This updates the dbx to the latest release from Microsoft.
</p>
<p>
Before installing the update, fwupd will check for any affected executables
in the ESP and will refuse to update if it finds any boot binaries signed
with any of the forbidden signatures.
</p>
</description>
<issues>
<issue type="cve">CVE-2023-28005</issue>
</issues>
</release>
</releases>
<requires>
<id compare="ge" version="1.8.14">org.freedesktop.fwupd</id>
</requires>
<custom>
<value key="LVFS::UpdateProtocol">org.uefi.dbx</value>
<value key="LVFS::VersionFormat">number</value>
</custom>
<categories>
<category>X-Configuration</category>
</categories>
</component>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions DBXUpdate-20220907.aa64.metainfo.xml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVE-2023-28005 describes a vulnerability in Trend Micro Endpoint Encryption Full Disk Encryption version 6.0.0.3204 and below. We shouldn't mention it in a DBXUpdate that deals with VMware esx-boot. mboot-official_arm64.efi

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Can you include that in your pull request please. I'd be very grateful for any help.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022 Richard Hughes <[email protected]> -->
<component type="firmware">
<id>org.linuxfoundation.dbx.aa64.firmware</id>
<name>Secure Boot dbx</name>
<name_variant_suffix>aa64</name_variant_suffix>
<summary>UEFI Secure Boot Forbidden Signature Database</summary>
<description>
<p>
Updating the UEFI dbx prevents starting EFI binaries with known security issues.
</p>
</description>
<provides>
<!-- Microsoft Corporation KEK CA 2011 -
UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_AA64 -->
<firmware type="flashed">67d35028-ca5b-5834-834a-f97380381082</firmware>
</provides>
<url type="homepage">https://uefi.org/revocationlistfile</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>proprietary</project_license>
<developer_name>Microsoft Corporation</developer_name>
<releases>
<!-- for the version use `fwupdtool firmware-parse foo.bin efi-signature-list` -->
<release urgency="high" version="22" date="2022-09-07">
<checksum filename="DBXUpdate-20220907.aa64.bin" target="content"/>
<description>
<p>
An insecure version of software from VMware has been added to the list of forbidden
signatures due to a discovered security problem.
This updates the dbx to the latest release from Microsoft.
</p>
<p>
Before installing the update, fwupd will check for any affected executables
in the ESP and will refuse to update if it finds any boot binaries signed
with any of the forbidden signatures.
</p>
</description>
<issues>
<issue type="cve">CVE-2023-28005</issue>
</issues>
</release>
</releases>
<requires>
<id compare="ge" version="1.8.14">org.freedesktop.fwupd</id>
</requires>
<custom>
<value key="LVFS::UpdateProtocol">org.uefi.dbx</value>
<value key="LVFS::VersionFormat">number</value>
</custom>
<categories>
<category>X-Configuration</category>
</categories>
</component>
Binary file added DBXUpdate-20220907.x64.bin
Binary file not shown.
53 changes: 53 additions & 0 deletions DBXUpdate-20220907.x64.metainfo.xml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVE-2023-28005 describes a vulnerability in Trend Micro Endpoint Encryption Full Disk Encryption version 6.0.0.3204 and below. We shouldn't mention it in a DBXUpdate that deals with VMware esx-boot. mboot-official_em64t.efi

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2022 Richard Hughes <[email protected]> -->
<component type="firmware">
<id>org.linuxfoundation.dbx.x64.firmware</id>
<name>Secure Boot dbx</name>
<name_variant_suffix>x64</name_variant_suffix>
<summary>UEFI Secure Boot Forbidden Signature Database</summary>
<description>
<p>
Updating the UEFI dbx prevents starting EFI binaries with known security issues.
</p>
</description>
<provides>
<!-- Microsoft Corporation KEK CA 2011 -
UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_X64 -->
<firmware type="flashed">f8ba2887-9411-5c36-9cee-88995bb39731</firmware>
</provides>
<url type="homepage">https://uefi.org/revocationlistfile</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>proprietary</project_license>
<developer_name>Microsoft Corporation</developer_name>
<releases>
<!-- for the version use `fwupdtool firmware-parse foo.bin efi-signature-list` -->
<release urgency="high" version="218" date="2022-09-07">
<checksum filename="DBXUpdate-20220907.x64.bin" target="content"/>
<description>
<p>
An insecure version of software from VMware has been added to the list of forbidden
signatures due to a discovered security problem.
This updates the dbx to the latest release from Microsoft.
</p>
<p>
Before installing the update, fwupd will check for any affected executables
in the ESP and will refuse to update if it finds any boot binaries signed
with any of the forbidden signatures.
</p>
</description>
<issues>
<issue type="cve">CVE-2023-28005</issue>
</issues>
</release>
</releases>
<requires>
<id compare="ge" version="1.8.14">org.freedesktop.fwupd</id>
</requires>
<custom>
<value key="LVFS::UpdateProtocol">org.uefi.dbx</value>
<value key="LVFS::VersionFormat">number</value>
</custom>
<categories>
<category>X-Configuration</category>
</categories>
</component>
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
all:
gcab --create --nopath DBXUpdate-20100307-x64.cab DBXUpdate-20100307.x64.bin DBXUpdate-20100307.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20140413-x64.cab DBXUpdate-20140413.x64.bin DBXUpdate-20140413.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20160809-x64.cab DBXUpdate-20160809.x64.bin DBXUpdate-20160809.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20200729-aa64.cab DBXUpdate-20200729.aa64.bin DBXUpdate-20200729.aa64.metainfo.xml
gcab --create --nopath DBXUpdate-20200729-ia32.cab DBXUpdate-20200729.ia32.bin DBXUpdate-20200729.ia32.metainfo.xml
gcab --create --nopath DBXUpdate-20200729-x64.cab DBXUpdate-20200729.x64.bin DBXUpdate-20200729.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20210429-aa64.cab DBXUpdate-20210429.aa64.bin DBXUpdate-20210429.aa64.metainfo.xml
gcab --create --nopath DBXUpdate-20210429-ia32.cab DBXUpdate-20210429.ia32.bin DBXUpdate-20210429.ia32.metainfo.xml
gcab --create --nopath DBXUpdate-20210429-x64.cab DBXUpdate-20210429.x64.bin DBXUpdate-20210429.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20220812-aa64.cab DBXUpdate-20220812.aa64.bin DBXUpdate-20220812.aa64.metainfo.xml
gcab --create --nopath DBXUpdate-20220812-ia32.cab DBXUpdate-20220812.ia32.bin DBXUpdate-20220812.ia32.metainfo.xml
gcab --create --nopath DBXUpdate-20220812-x64.cab DBXUpdate-20220812.x64.bin DBXUpdate-20220812.x64.metainfo.xml
gcab --create --nopath DBXUpdate-20230314-aa64.cab DBXUpdate-20230314.aa64.bin DBXUpdate-20230314.aa64.metainfo.xml
gcab --create --nopath DBXUpdate-20230314-ia32.cab DBXUpdate-20230314.ia32.bin DBXUpdate-20230314.ia32.metainfo.xml
gcab --create --nopath DBXUpdate-20230314-x64.cab DBXUpdate-20230314.x64.bin DBXUpdate-20230314.x64.metainfo.xml
Expand Down
65 changes: 37 additions & 28 deletions stats.py
hughsie marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,46 @@ def __repr__(self) -> str:
return "DbxFile[{}]".format(", ".join(str(entry) for entry in self.entries))


def print_stats() -> None:
for arch in ["ia32", "aa64", "x64"]:
dbxfiles: List[DbxFile] = []
for filename in sorted(glob.glob("DBXUpdate*.{}.bin".format(arch))):
dbxfiles.append(DbxFile(filename))
for idx, dbxfile_new in enumerate(dbxfiles):

if idx == 0:
dbxfile_old = None
dbxfile_fns = "origin -> {}".format(dbxfile_new.filename)
else:
dbxfile_old = dbxfiles[idx - 1]
dbxfile_new = dbxfiles[idx]
dbxfile_fns = "{} -> {}".format(
dbxfile_old.filename, dbxfile_new.filename
)
def print_stats(fns: List[str]) -> None:

dbxfiles: List[DbxFile] = []
for filename in fns:
dbxfiles.append(DbxFile(filename))

# look for added hashes
for entry in dbxfile_new.entries:
if not dbxfile_old or not dbxfile_old.find_entry_from_hash(
entry.checksum
):
print("{} ADD {}".format(dbxfile_fns.ljust(60), str(entry)))
for idx, dbxfile_new in enumerate(dbxfiles):

# look for removed hashes
if dbxfile_old:
for entry in dbxfile_old.entries:
if not dbxfile_new.find_entry_from_hash(entry.checksum):
print("{} DEL {}".format(dbxfile_fns.ljust(60), str(entry)))
if idx == 0:
dbxfile_old = None
dbxfile_fns = "origin -> {}".format(dbxfile_new.filename)
else:
dbxfile_old = dbxfiles[idx - 1]
dbxfile_new = dbxfiles[idx]
dbxfile_fns = "{} -> {}".format(
dbxfile_old.filename, dbxfile_new.filename
)

# look for added hashes
for entry in dbxfile_new.entries:
if not dbxfile_old or not dbxfile_old.find_entry_from_hash(
entry.checksum
):
print("{} ADD {}".format(dbxfile_fns.ljust(60), str(entry)))

# look for removed hashes
if dbxfile_old:
for entry in dbxfile_old.entries:
if not dbxfile_new.find_entry_from_hash(entry.checksum):
print("{} DEL {}".format(dbxfile_fns.ljust(60), str(entry)))


if __name__ == "__main__":
print_stats()

if len(sys.argv) > 1:
print_stats(sys.argv[1:])
else:
fns: List[str] = []
for arch in ["ia32", "aa64", "x64"]:
for fn in glob.glob("DBXUpdate*.{}.bin".format(arch)):
fns.append(fn)
print_stats(sorted(fns))
sys.exit(0)