From nobody Mon Apr 21 17:43:44 2025 X-Original-To: freebsd-pkgbase@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZhCRN5yz2z5snN7 for ; Mon, 21 Apr 2025 17:44:16 +0000 (UTC) (envelope-from gordon@tetlows.org) Received: from outbound.mr.icloud.com (p-west2-cluster5-host5-snip6-7.eps.apple.com [IPv6:2a01:b747:3000:206::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZhCRN0WJ2z3VwR for ; Mon, 21 Apr 2025 17:44:16 +0000 (UTC) (envelope-from gordon@tetlows.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tetlows.org header.s=sig1 header.b=awC9FuAr; dmarc=pass (policy=quarantine) header.from=tetlows.org; spf=pass (mx1.freebsd.org: domain of gordon@tetlows.org designates 2a01:b747:3000:206::32 as permitted sender) smtp.mailfrom=gordon@tetlows.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tetlows.org; s=sig1; bh=atLR/R1N4cFv6Z/ERKlQ9OHUEy2VxwCm7ie+RpxYmSM=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To:x-icloud-hme; b=awC9FuArVhFCAj4Hng/yCWkWpImbhiU9iuaXr/LcZ/yV//aw238oWBMJwy1Ux0Gub 0u7bVFVTtcJ1ucVw/4G+RoNmkTRhyqbz95lvlvBn9CzkdE95Q30dD4dA6LxQQdzfBc 3z0pMKCVCJtwWo1L8E3VecyBIvHZ9Qc4m+Ogw7EVwO9Edr3I49MUfebQyGEqyn1Fr3 ei/6CowEza2IeuDI3l8ssSSFkEZzhVIxgveY34vx3tzR3h+TUrElMspUPfKLN1z29I 8mKHZXz3teGhOxb3gXOSm8M/SLOun9DOY18m19sfqJFy9t6Q0U7pzwIN9GLkM1Qctu g8K+U/2HN6rxA== Received: from smtpclient.apple (mr-asmtp-me-k8s.p00.prod.me.com [17.57.152.38]) by outbound.mr.icloud.com (Postfix) with ESMTPSA id BFDE7180128D for ; Mon, 21 Apr 2025 17:44:11 +0000 (UTC) From: Gordon Tetlow Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Packaging the FreeBSD base system List-Archive: https://lists.freebsd.org/archives/freebsd-pkgbase List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkgbase@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Splitting critical libraries from interactive shell in runtime package Message-Id: <015C4C6B-1CEC-4398-A8B9-CE21E88C617C@tetlows.org> Date: Mon, 21 Apr 2025 10:43:44 -0700 To: freebsd-pkgbase@freebsd.org X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Proofpoint-GUID: GxT1xGyvdUTpmOIDjMlNikOXpHV2dQ7G X-Proofpoint-ORIG-GUID: GxT1xGyvdUTpmOIDjMlNikOXpHV2dQ7G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-21_08,2025-04-21_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1030 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 mlxlogscore=830 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2504210139 X-Spamd-Result: default: False [-0.44 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(0.67)[0.673]; DMARC_POLICY_ALLOW(-0.50)[tetlows.org,quarantine]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[tetlows.org:s=sig1]; R_SPF_ALLOW(-0.20)[+ip6:2a01:b747:3000:200::/56:c]; ONCE_RECEIVED(0.20)[]; NEURAL_SPAM_LONG(0.19)[0.189]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[gordon]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:714, ipnet:2a01:b747:3000::/48, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-pkgbase@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-pkgbase@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[tetlows.org:+] X-Rspamd-Queue-Id: 4ZhCRN0WJ2z3VwR X-Spamd-Bar: / A while ago, I was playing around with building stripped down jails = based on pkgbase and noticed that /bin/sh and a whole host of = interactive commands is in the FreeBSD-runtime package. This seemed = weird to me as my stripped down jail that is intended to run nginx = should only have the runtime libraries necessary. Including /bin/sh and = friends is unnecessary and would only enable an attacker to gain a = foothold more easily. I recall trying to get it more minimal, but = FreeBSD-runtime is a critical package that must be installed given = things like PAM and some extremely critical libraries (libz, libcap, = libutil, etc) are in this package. So, my proposal/question is, can we split out the critical libraries = from the shell and supporting commands in the runtime package so a = minimal jail could be properly built via pkgbase? What needs to happen = to make that work? Digging around, I found dfr@ asking about this in = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273783. There seemed = to be agreement from manu@ that making a shell-free environment is a = good goal we can support. Thanks, Gordon=