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 2040476 - openssl x509 -email crashes with double free or corruption (fasttop)
Summary: openssl x509 -email crashes with double free or corruption (fasttop)
Keywords:
Status: CLOSED DUPLICATE of bug 2039993
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openssl
Version: 7.9
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Sahana Prasad
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-13 18:58 UTC by Michael Buchfink
Modified: 2022-01-14 09:04 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-14 09:03:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-107886 0 None None None 2022-01-13 18:59:15 UTC

Description Michael Buchfink 2022-01-13 18:58:14 UTC
Description of problem:
When parsing a x509 certificate for entry email openssl crashes with double free or corruption (fasttop)

Version-Release number of selected component (if applicable):
openssl-1.0.2k-23.el7_9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. openssl req -x509 -newkey rsa -keyout key.pem -out cert.pem -nodes \
   -subj '/CN=localhost' -extensions san \
   -config <(echo '[req]'; echo 'distinguished_name=req'; echo '[san]'; echo 'subjectAltName=email:test@localhost')
2. openssl x509 -noout -email -in cert.pem

Actual results:
*** Error in `openssl': double free or corruption (fasttop): 0x0000000001f101e0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7f508880c329]
/lib64/libcrypto.so.10(CRYPTO_free+0x1d)[0x7f5088fe196d]
/lib64/libcrypto.so.10(sk_pop_free+0x30)[0x7f5089099360]
/lib64/libcrypto.so.10(+0x170ed5)[0x7f50890e3ed5]
/lib64/libcrypto.so.10(+0x170fb2)[0x7f50890e3fb2]
/lib64/libcrypto.so.10(X509_get1_email+0x2d)[0x7f50890e401d]
openssl[0x43393c]
openssl[0x41a708]
openssl[0x41a3fe]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f50887ad555]
openssl[0x41a4c3]
======= Memory map: ========
00400000-00480000 r-xp 00000000 fd:00 8048                               /usr/bin/openssl
00680000-00681000 r--p 00080000 fd:00 8048                               /usr/bin/openssl
00681000-00687000 rw-p 00081000 fd:00 8048                               /usr/bin/openssl
00687000-00688000 rw-p 00000000 00:00 0
01e9a000-01f81000 rw-p 00000000 00:00 0                                  [heap]
...

Expected results:
test@localhost

Additional info:
Workaround: Downgrade to openssl-1.0.2k-22.el7_9 and openssl-libs-1.0.2k-22.el7_9

Comment 3 Sahana Prasad 2022-01-14 09:03:54 UTC

*** This bug has been marked as a duplicate of bug 2039993 ***


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