Skip to content

Commit 73705d6

Browse files
authored
Merge pull request #882 from shubhamshinde360/PA-6507-gem-update-rexml-7.x
(PA-6507)(PA-6736) Gem install rexml to 3.3.2 for CVE-2024-35176 and …
2 parents 311535a + fec0fd8 commit 73705d6

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
component 'rubygem-rexml' do |pkg, settings, platform|
2-
pkg.version '3.2.6'
3-
pkg.md5sum 'a57288ae5afed07dd08c9f1302da7b25'
2+
pkg.version '3.3.2'
3+
pkg.md5sum '55d213401f5e6a7a83ff3d2cd64a23fe'
44

5+
# If the platform is solaris with sparc architecture in agent-runtime-7.x project, we want to gem install rexml
6+
# ignoring the dependencies, this is because the pl-ruby version used in these platforms is ancient so it gets
7+
# confused when installing rexml. It tries to install rexml's dependency 'strscan' by building native extensions
8+
# but fails. We can ignore insalling that since strscan is already shipped with ruby 2 as its default gem.
9+
if platform.name =~ /solaris-(10|11)-sparc/ && settings[:ruby_version].to_i < 3
10+
settings["#{pkg.get_name}_gem_install_options".to_sym] = "--ignore-dependencies"
11+
end
12+
513
instance_eval File.read('configs/components/_base-rubygem.rb')
614
end

configs/projects/agent-runtime-7.x.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
proj.component 'rubygem-thor'
6262
proj.component 'rubygem-scanf'
6363

64+
# We add rexml explicitly in here because even though ruby 2 ships with rexml as its default gem, the version
65+
# of rexml it ships with contains CVE-2024-35176 and CVE-2024-39908. So, we add it here to update to a higher version
66+
# free from the CVEs.
67+
proj.component 'rubygem-rexml'
68+
6469
if platform.is_linux?
6570
proj.component "virt-what"
6671
proj.component "dmidecode" unless platform.architecture =~ /ppc64/

0 commit comments

Comments
 (0)