Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication of sysctl default parameter fs.protected_hardlinks and fs.protected_symlinks #502

Closed
BenjaminBoehm opened this issue Nov 18, 2021 · 2 comments
Labels

Comments

@BenjaminBoehm
Copy link

It seems that some sysctl default parameters are defined multiple times.
This generates this error:

[WARNING]: While constructing a mapping from ~/ansible_collections/devsec/hardening/roles/os_hardening/defaults/main.yml, line 70, column 3, found a duplicate dict key (fs.protected_hardlinks). Using last defined value only.
[WARNING]: While constructing a mapping from ~/ansible_collections/devsec/hardening/roles/os_hardening/defaults/main.yml, line 70, column 3, found a duplicate dict key (fs.protected_symlinks). Using last defined value only.

We can keep:

# These settings eliminate an entire class of security vulnerabilities:
# time-of-check-time-of-use cross-privilege attacks using guessable
# filenames (generally seen as "/tmp file race" vulnerabilities).
fs.protected_hardlinks: 1
fs.protected_symlinks: 1

and delete:

# Restrict hardlink creation behavior
fs.protected_hardlinks: 1

# Restrict symlink following behavior
fs.protected_symlinks: 1

If that is what we should do, I can create a PR.

@rndmh3ro
Copy link
Member

A PR would be great, thanks!

@rndmh3ro
Copy link
Member

Closed by #505

@rndmh3ro rndmh3ro added the bug label Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants