-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…39908 - 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. - Added the change to _shared-agent-components since the CVEs impacts both agent-runtime-main (ruby 3.2.4 using rexml 3.2.6) and agent-runtime-7.x (ruby 2.7.8 using rexml 3.2.3) - 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 str scan since it is shipped with ruby 2.7.8 as its default gem. - rexml is a bundled gem in ruby 3. - When we gem install rexml version 3.3.2 to resolve CVEs, we end up having two versions of rexml -- rexml 3.2.5 which is shipped with ruby as its bundled gem and rexml 3.3.2 which we manually installed. - This causes 'Gem::Specification.reset:rexml' warning to go to stderr each time puppet runs. - Run 'gem cleanup rexml' so that it removes the 3.2.5 version for both agent-runtimes and pe-bolt-server-runtime-main, the impacted projects requiring the rexml component.
- Loading branch information
1 parent
311535a
commit 8d0533a
Showing
5 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
component 'rubygem-rexml' do |pkg, settings, platform| | ||
pkg.version '3.2.6' | ||
pkg.md5sum 'a57288ae5afed07dd08c9f1302da7b25' | ||
pkg.version '3.3.2' | ||
pkg.md5sum '55d213401f5e6a7a83ff3d2cd64a23fe' | ||
|
||
# If the platform is solaris with sparc architecture in agent-runtime-7.x project, we want to gem install rexml | ||
# ignoring the dependencies, this is because the pl-ruby version used in these platforms is ancient so it gets | ||
# confused when installing rexml. It tries to install rexml's dependency 'strscan' by building native extensions | ||
# but fails. We can ignore insalling that since strscan is already shipped with ruby 2 as its default gem. | ||
if platform.name =~ /solaris-(10|11)-sparc/ && settings[:ruby_version].to_i < 3 | ||
settings["#{pkg.get_name}_gem_install_options".to_sym] = "--ignore-dependencies" | ||
end | ||
|
||
instance_eval File.read('configs/components/_base-rubygem.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters