ComplianceAsCode / ComplianceAsCode/content
sysctl_kernel_kptr_restrict should pass with stricter value
- Dominant language
- Shell
- Stars
- 2.8k
- Forks
- 828
- Avg merge
- 3d 8m
- Merged PRs (30d)
- 80
Description
#### Description of problem:
Apply to the rule `sysctl_kernel_kptr_restrict`
This rule check that `kernel.kptr_restrict=1`, but there is also a `2` value that is stricter and more secure (REF: [Kernel documentation](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#kptr-restrict)).
The test should pass with both `1` and `2` values.
#### SCAP Security Guide Version:
Benchmark ID: xccdf_org.ssgproject.content_benchmark_FEDORA
Benchmark version: 0.1.69
Profile ID: xccdf_org.ssgproject.content_profile_ospp
#### Operating System Version:
Fedora 38
#### Steps to Reproduce:
- Run `sudo sysctl -w kernel.kptr_restrict=2`
- Run `oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_ospp /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml`
#### Actual Results:
The rules check FAIL
#### Expected Results:
The rules check PASS
Contributor guide
Assessment
This issue has not been assessed yet.