Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2180445

Summary: Random memory overwrite
Product: Red Hat Enterprise Linux 9 Reporter: Tomas Halman <thalman>
Component: cjoseAssignee: Tomas Halman <thalman>
Status: CLOSED ERRATA QA Contact: Scott Poore <spoore>
Severity: unspecified Docs Contact:
Priority: low    
Version: 9.0CC: aboscatt, bstinson, hans.zandbelt, jwboyer, nickgearls, thalman
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: cjose-0.6.1-13.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2072469 Environment:
Last Closed: 2023-11-07 08:29:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2072469    
Bug Blocks:    

Description Tomas Halman 2023-03-21 13:42:00 UTC
+++ This bug was initially created as a clone of Bug #2072469 +++

In jwe.c, on line 1952:
  cek = cjose_get_alloc()(cek_len);
  memcpy(cek, jwe->cek, cek_len);

allocation result is not checked. We should add (before memcpy):
  if (!cek) {
   CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);
   return NULL;
  }

Bug registered at https://github.com/cisco/cjose/issues/110.

Cisco does not maintain this repo anymore; do you plan to maintain the package in Redhat?
For info, there's a fork trying to keep this software up-to-date (and it includes this patch): https://github.com/zmartzone/cjose/tree/version-0.6.2.x

--- Additional comment from Andre Boscatto on 2022-11-15 02:34:41 UTC ---

Hi Tomas,

Are you still working on this? If yes, can we plan the DTM/ITM/ITR? If not, can you please move it back to NEW, so we can make sure the status is not misleading? let me know if I can help somehow :)

--- Additional comment from Tomas Halman on 2022-11-15 09:49:25 UTC ---

This is an easy update and the fix is available upstream. We are limited by QE capacity here - I think it is good candidate for Q1.

We do not have any real problem reported by customers but such things may cause security issues, so we should fix it soon.

--- Additional comment from Hans Zandbelt on 2022-11-18 16:18:50 UTC ---

I'd also like to ask you to switch to the maintenance fork at https://github.com/zmartzone/cjose, as suggested before in https://github.com/cisco/cjose/issues/121 ; the parent project's last commit was 3.5 years ago, and issues no longer get addressed; for the record, Debian has made that switch https://salsa.debian.org/debian/cjose

--- Additional comment from Tomas Halman on 2022-11-21 08:01:53 UTC ---

Sure Hans, I count on that.

--- Additional comment from  on 2022-12-16 15:47:00 UTC ---

I switched to the maintenance fork, thanks for maintaining it

Comment 5 Scott Poore 2023-05-11 19:11:03 UTC
Verified sanity only.

Version ::

mod_auth_openidc-2.4.9.4-4.el9.x86_64

Gating tests passed:

-------------------- generated xml file: /root/federation_testing/result_oidc.xml ---------------------
========================================== 4 passed in 1.79s ==========================================

Comment 7 errata-xmlrpc 2023-11-07 08:29:09 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 (cjose 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.

https://access.redhat.com/errata/RHBA-2023:6382