Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

(PA-6507)(PA-6736) Gem install rexml to 3.3.2 for CVE-2024-35176 and … #882

Conversation

shubhamshinde360
Copy link
Contributor

CVE-2024-39908 in 7.x

  • The CVEs were fixed from rexml version 3.2.7 (CVE-2024-35176) and 3.3.2 (CVE-2024-39908).
  • Patching for the CVE wasn't getting applied cleanly and had a lot of conflicts. So updated the gem version to 3.3.2 in the rexml component file.
  • This addresses the CVEs for 7.x.
  • For solaris-10-sparc and solaris-11-sparc, we ignore dependency when installing rexml since the ruby in these platforms tries to install strscan (rexml's dependency) but fails while building native extensions. We can ignore installing strscan since it is shipped with ruby 2.7.8 as its default gem.

…VE-2024-39908 in 7.x

 - The CVEs were fixed from rexml version 3.2.7 (CVE-2024-35176) and 3.3.2 (CVE-2024-39908).
 - Patching for the CVE wasn't getting applied cleanly and had a lot of conflicts. So updated the gem version to 3.3.2 in the rexml component file.
 - This addresses the CVEs for 7.x.
 - For solaris-10-sparc and solaris-11-sparc, we ignore dependency when installing rexml since the ruby in these platforms tries to install strscan (rexml's dependency) but fails while building native extensions. We can ignore installing strscan since it is shipped with ruby 2.7.8 as its default gem.
@shubhamshinde360 shubhamshinde360 requested review from a team as code owners July 29, 2024 16:31
@shubhamshinde360
Copy link
Contributor Author

shubhamshinde360 commented Jul 29, 2024

We will be upgrading to ruby 3.2.5 to address the CVEs in main.
This PR addresses the CVEs in 7.x.

@joshcooper
Copy link
Contributor

joshcooper commented Jul 30, 2024

It looks good to me, though somewhat unrelated to your PR, why does pe-bolt-server-runtime include the rexml gem component? It's a bundled gem in ruby 3.2 so seems unnecessary to be explicitly added.

Ah it looks like it was added in f29521d in order to be compatible with JRuby 9.4. So we'll need to get approval from skeletor to merge this.

If it's ok to bump rexml for pe-bolt-server-runtime-main, could you update your commit message?

If we don't want to bump rexml for pe-bolt-server-runtime-main, then we should allow the version to be passed in. Have it default to the latest version and update pe-bolt-server-runtime-main to pass in the older version. Note how we override rubygem_deep_merge_version in some projects.

Copy link
Contributor

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

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

Looking back at this i'm not convinced I actually need rexml in bolt-server. I will go ahead and check that separately this update should be fine, Thanks for the heads up.

@joshcooper joshcooper merged commit 73705d6 into puppetlabs-toy-chest:master Jul 31, 2024
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants