FreeBSD
TMA-FREEBSD-1.1.2.1.2
Ensure nosuid option set on /tmp partition
설명
The nosuid mount option specifies that the filesystem cannot contain setuid files. WARNING This option is worthless if a publicly available suid or sgid wrapper is installed on your system. It is set automatically when the user does not have super-user privileges. Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp. Audit: when /tmp is a separate mount, its options (mount -p) must include nosuid; no separate mount is compliant (see the partition recommendation).
점검 방법
감사 방식: 셸 명령
command -v mount >/dev/null 2>&1 || exit 1; o=$(mount -p | awk '$2=="/tmp" {print $4}'); if [ -z "$o" ]; then echo compliant; else case ",$o," in *,nosuid,*) echo compliant;; *) echo "/tmp options: $o";; esac; fi- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
- IF - a separate partition exists for /tmp without the type tmpfs. Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition. Example: <device> /tmp <fstype> rw,nosuid,noexec 0 0 Run the following command to remount /tmp with the configured options: # mount -u -o nosuid /tmp
속성
- 운영 체제
- 모두
- 태그
- freebsdpermissions
- 참고 자료
- CIS FreeBSD 14 Benchmark v1.0.1 - 1.1.2.1.2 Ensure nosuid option set on /tmp partition
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target freebsd