From owner-freebsd-questions@freebsd.org Sat Feb 11 09:49:33 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41917CD9A94 for ; Sat, 11 Feb 2017 09:49:33 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from lb3-smtp-cloud2.xs4all.net (lb3-smtp-cloud2.xs4all.net [194.109.24.29]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "*.xs4all.nl", Issuer "GlobalSign Domain Validation CA - SHA256 - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D6160DE7 for ; Sat, 11 Feb 2017 09:49:32 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.erewhon.home ([83.162.243.5]) by smtp-cloud2.xs4all.net with ESMTP id jMoJ1u00R07iGuj01MoKrh; Sat, 11 Feb 2017 10:48:20 +0100 Received: from rsmith (uid 1001) (envelope-from rsmith@xs4all.nl) id 1230c by slackbox.erewhon.home (DragonFly Mail Agent v0.11+); Sat, 11 Feb 2017 10:48:18 +0100 Date: Sat, 11 Feb 2017 10:48:18 +0100 From: Roland Smith To: byrnejb@harte-lyne.ca Cc: FreeBSD-questions@freebsd.org Subject: Re: hardening /tmp Message-ID: <20170211094818.GA70716@slackbox.erewhon.home> Mail-Followup-To: byrnejb@harte-lyne.ca, FreeBSD-questions@freebsd.org References: <687643e26aeb858b3b5d9f5693829360.squirrel@webmail.harte-lyne.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ibTvN161/egqYuK8" Content-Disposition: inline In-Reply-To: <687643e26aeb858b3b5d9f5693829360.squirrel@webmail.harte-lyne.ca> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2017 09:49:33 -0000 --ibTvN161/egqYuK8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 08, 2017 at 10:22:48AM -0500, James B. Byrne via freebsd-questi= ons wrote: > How do most people handle hardening /tmp and /var/tmp on FreeBSD? I > can get rid of /tmp from the file system and then simply mount it as a > tmpfs in /etc/fstab. >=20 > tmpfs /tmp tmpfs rw,nosuid,noexec,mode=3D01777 0 0 >=20 > However, /var/tmp is supposed to survive across reboots so how is this > handled? You cannot have noexec set on /tmp if you want to run =E2=80=9Cmake install= world=E2=80=9D! You could make a separate partition/dataset for /var/tmp and mount that as noexec/nosuid. If you *really* want to harden your server, you should probably increase the kern.securelevel sysctl. See security(7). Roland --=20 R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0) --ibTvN161/egqYuK8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEV1MzJBZhsP6Nk/ztQPbV3KOKM+AFAlie3eIACgkQQPbV3KOK M+A+VhAAhJ3GF7WTrTAKvgj9DFbCJg7+f5zfReq9c9P1tEXIO77ZeZFjqxVWW4ZU w4IQBW+SGSVfGPATRcvabDNU9uvKDvDbtwWj3/3huc/p1h/V+vjBApReChbls9BR X601WQf0nZjEd1tkH5U8GVUTPCzyg1RtEEAl/8g6Z9jgRczyk1swa2tqvbxW7by/ 24w1ovakDFX1Vg28a+fGBcIieqjyiVy6TzJ4oQ4ri7NqqOV7XjYpUPVs2KoNGfXO 9pykSURabgB5hP1RTqmVIqFfHtIlGD/4k4jDwlVD01UhJ0t5LLvmWQypB6M0CC3G NJTC7eaeN5TMjG3uPxiThnJtufKu3E0HI8PhDtFqFSqXD4WMWH2qqvf6kKYN+qOd u/9oHt9gpIc2x18Ve0B/euAhs48f3BRtdC+NG/hDuTK/Z9I0F5EABbowIrzUyFRw oK3pEUEj0Bk9Cc4sWawLR31CP84Kf5h8mpucSsfcH38rDTRWY5ydquV5Q/+98RXJ SKnFn2rg6dcCTyaJyPGN6IfVNGkGHBOACMjY1Abmt/qEoRcl/ddmkdJZRixszoy0 5j2/yp0rJQg0aDx3Acynaml/JBaBTD157uxZNoosQQMMYEzIF3jMZcuYMhVF7R+q kpyrFo/fTGevEpRpNSDqkhulOc7tmnjko0HmEZjdtX2/lBxWMH8= =o983 -----END PGP SIGNATURE----- --ibTvN161/egqYuK8--