From nobody Thu Nov 9 08:09:00 2023 X-Original-To: freebsd-arch@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 4SQvjy6v1xz50brM for ; Thu, 9 Nov 2023 08:09:10 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SQvjx6gbLz3LxQ for ; Thu, 9 Nov 2023 08:09:09 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.17.1/8.17.1) with ESMTPS id 3A98906t031322 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 9 Nov 2023 09:09:00 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.17.1/8.17.1/Submit) id 3A98906I031321; Thu, 9 Nov 2023 09:09:00 +0100 (CET) (envelope-from fuz) Date: Thu, 9 Nov 2023 09:09:00 +0100 From: Robert Clausecker To: Alexander Leidinger Cc: freebsd-arch@freebsd.org Subject: Re: Any particular reason we don't have sshd oomprotected by default? Message-ID: References: <8b9484ba83e373ece0e322e14c924da6@Leidinger.net> List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b9484ba83e373ece0e322e14c924da6@Leidinger.net> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Queue-Id: 4SQvjx6gbLz3LxQ Hi Alexander, I encountered the same issue a while ago, leaving my system in a vegetative state. I would propose to add syslogd and cron to the list. Syslogd because when it dies and you don't notice, you may go for a long time without syslogs, cron because a dead cron means no housekeeping tasks happen, including some which the administrator may have intended to fix an issue causing an OOM condition (e.g. periodically restarting services with known memory leaks or cleaning tmpfs-based file systems). Yours, Robert Clausecker Am Thu, Nov 09, 2023 at 08:54:22AM +0100 schrieb Alexander Leidinger: > Hi, > > We have syslogd oomprotected by default (/etc/defaults/rc.conf). Is there a > particular reason we don't have sshd protected the same way? > > Any objections if I would commit such a change (sshd_oomprotect=YES in > defaults/rc.conf)? > > I was also thinking about which other daemon we should protect by default, > but apart from the need to make sure important logs are written to find > issues which may have caused the oom trigger, and the need to be able to > login to such a troubled system, I didn't see any other service as such > critical (we could argue about ntpd, but I send to be on the "may be > protected" (not for my use cases) and not to be on the "has to be protected" > side) to include it in this proposal. > > Bye, > Alexander. > > -- > http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF > http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments