Skip to content

Commit

Permalink
Merge pull request #172 from dev-sec/protected_fifos
Browse files Browse the repository at this point in the history
fix handling of sysctl fs.protected_fifos and fs.protected_regular
  • Loading branch information
schurzi authored Jul 11, 2022
2 parents 34b215b + 5247b07 commit 81ce2ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controls/sysctl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@
desc 'Protects against common exploits in regards to links, fifos and regular files created or controlled by attackers'
only_if { !container_execution }
describe kernel_parameter('fs.protected_fifos') do
its(:value) { should match cmp(/(1|2)/) }
its(:value) { should eq(1).or eq(2).or eq(nil) } # include nil because RHEL7 does not have this parameter
end
describe kernel_parameter('fs.protected_hardlinks') do
its(:value) { should eq 1 }
end
describe kernel_parameter('fs.protected_regular') do
its(:value) { should eq 2 }
its(:value) { should eq(2).or eq(nil) } # include nil because RHEL7 does not have this parameter
end
describe kernel_parameter('fs.protected_symlinks') do
its(:value) { should eq 1 }
Expand Down

0 comments on commit 81ce2ab

Please sign in to comment.