Skip to content

Commit bae90be

Browse files
committed
Fix for CVE-2016-2183 in FIPS mode
Fixes #334
1 parent d9fe7ce commit bae90be

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Wed Jan 07 2026 Steven Pritchard <steve@sicura.us> - 5.0.1
2+
- Fix for CVE-2016-2183 in FIPS mode (#334)
3+
14
* Tue Nov 25 2025 Steven Pritchard <steve@sicura.us> - 5.0.0
25
- Make the various `assert` functions non-fatal by default
36

lib/facter/fips_ciphers.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# List available FIPS-compatible OpenSSL ciphers on the system
2+
# Excludes weak ciphers vulnerable to CVE-2016-2183 (SWEET32)
23
# Returns: Array[String]
34
Facter.add('fips_ciphers') do
45
confine kernel: 'Linux'
56
openssl_bin = Facter::Core::Execution.which('openssl')
67

78
setcode do
8-
Facter::Core::Execution.exec("#{openssl_bin} ciphers FIPS:-LOW").split(':') if openssl_bin
9+
# Exclude 3DES and other weak ciphers:
10+
# - 3DES (vulnerable to SWEET32/CVE-2016-2183)
11+
# - LOW (weak encryption)
12+
# - NULL (no encryption)
13+
# - EXPORT (weak export-grade)
14+
# - anon (anonymous, no authentication)
15+
Facter::Core::Execution.exec("#{openssl_bin} ciphers 'FIPS:-3DES:-LOW:-NULL:-EXPORT:-aNULL'").split(':') if openssl_bin
916
end
1017
end

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simp-simplib",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"author": "SIMP Team",
55
"summary": "A collection of common SIMP functions, facts, and types",
66
"license": "Apache-2.0",

spec/unit/facter/fips_ciphers_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
context 'openssl command exists' do
1010
it 'returns FIPS ciphers' do
1111
expect(Facter::Core::Execution).to receive(:which).with('openssl').and_return('/bin/openssl')
12-
expect(Facter::Core::Execution).to receive(:exec).with('/bin/openssl ciphers FIPS:-LOW')
12+
expect(Facter::Core::Execution).to receive(:exec).with("/bin/openssl ciphers 'FIPS:-3DES:-LOW:-NULL:-EXPORT:-aNULL'")
1313
.and_return('ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA')
1414
expect(Facter.fact('fips_ciphers').value).to eq(['ECDHE-RSA-AES256-GCM-SHA384', 'ECDHE-ECDSA-AES256-GCM-SHA384', 'ECDHE-RSA-AES256-SHA384', 'ECDHE-ECDSA-AES256-SHA384', 'ECDHE-RSA-AES256-SHA'])
1515
end

0 commit comments

Comments
 (0)