RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2140670 - Segmentation fault in /usr/share/keylime/create_mb_refstate script
Summary: Segmentation fault in /usr/share/keylime/create_mb_refstate script
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: keylime
Version: 9.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Sergio Correia
QA Contact: Patrik Koncity
Jan Fiala
Depends On: 2150830
Blocks: 2142034
TreeView+ depends on / blocked
Reported: 2022-11-07 15:18 UTC by Anderson Sasaki
Modified: 2023-05-09 08:59 UTC (History)
8 users (show)

Fixed In Version: keylime-6.5.2-1.el9
Doc Type: Bug Fix
Doc Text:
.Keylime policy generation script no longer causes a segmentation fault and core dump The `create_mb_refstate` script generates policies for measured boot attestation in Keylime. Previously, `create_mb_refstate` incorrectly calculated the data length in the `DevicePath` field. As a consequence, the script tried to access invalid memory using the incorrectly calculated length, which resulted in a segmentation fault and core dump. This update, which has been published in advisory link:https://errata.devel.redhat.com/advisory/105318[RHBA-2022:105318-02], prevents the segmentation fault when processing the measured boot event log. As a consequence, you can generate a measured boot policy.
Clone Of:
: 2142034 (view as bug list)
Last Closed: 2023-05-09 07:45:11 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)
base64 encoded binary measured boot log (25.06 KB, text/plain)
2022-11-07 15:18 UTC, Anderson Sasaki
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-138535 0 None None None 2022-11-07 15:32:09 UTC
Red Hat Issue Tracker SECENGSP-4865 0 None None None 2022-11-07 15:32:13 UTC
Red Hat Product Errata RHBA-2023:2307 0 None None None 2023-05-09 07:45:34 UTC

Description Anderson Sasaki 2022-11-07 15:18:22 UTC
Created attachment 1922775 [details]
base64 encoded binary measured boot log

Description of problem:
Running /usr/share/keylime/create_mb_refstate script with some inputs (e.g. the input provided as an attachment) causes a segmentation fault and core dump.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download the attachment mb_log.b64

2. Decode to a binary file:
$ base 64 -d mb_log.b64 > mb_log.bin

3. Provide the decoded binary as input (may require privileges to access configuration files)
# /usr/share/keylime/create_mb_refstate mb_log.bin mb_refstate.json

Actual results:
Segmentation fault (core dumped)

Expected results:
The scripts execute normally and the output file mb_refstate.json is created

Additional info:
Initially reported upstream as https://github.com/keylime/keylime/issues/1153

Comment 21 errata-xmlrpc 2023-05-09 07:45:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (keylime bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.