10-fs-related.conf 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # /etc/sysctl.d/10-fs-related.conf - Filesystem related.
  2. #
  3. # Values: [0] DISABLE, [1] ENABLE.
  4. #
  5. # A long-standing class of security issues is the symlink-based
  6. # time-of-check-time-of-use race, most commonly seen in world-writable
  7. # directories like /tmp. The common method of exploitation of this
  8. # flaw is to cross privilege boundaries when following a given symlink
  9. # (i.e. a root process follows a symlink belonging to another user).
  10. # For a likely incomplete list of hundreds of examples across the
  11. # years, please see:
  12. # http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp
  13. #
  14. # When set to "0", symlink following behavior is unrestricted.
  15. #
  16. # When set to "1" symlinks are permitted to be followed only when
  17. # outside a sticky world-writable directory, or when the uid of the
  18. # symlink and follower match, or when the directory owner matches the
  19. # symlink's owner.
  20. #
  21. fs.protected_symlinks = 1
  22. # A long-standing class of security issues is the hardlink-based
  23. # time-of-check-time-of-use race, most commonly seen in world-writable
  24. # directories like /tmp. The common method of exploitation of this
  25. # flaw is to cross privilege boundaries when following a given hardlink
  26. # (i.e. a root process follows a hardlink created by another user).
  27. # Additionally, on systems without separated partitions, this stops
  28. # unauthorized users from "pinning" vulnerable setuid/setgid files
  29. # against being upgraded by the administrator, or linking to special
  30. # files.
  31. #
  32. # When set to "0", hardlink creation behavior is unrestricted.
  33. #
  34. # When set to "1" hardlinks cannot be created by users if they do not
  35. # already own the source file, or do not have read/write access to it.
  36. #
  37. fs.protected_hardlinks = 1