From owner-freebsd-security@freebsd.org Sun May 30 13:39:22 2021 Return-Path: Delivered-To: freebsd-security@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54A176558E6 for ; Sun, 30 May 2021 13:39:22 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FtKK46nZPz4lj4 for ; Sun, 30 May 2021 13:39:20 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: by mail-io1-xd31.google.com with SMTP id k22so9231593ioa.9 for ; Sun, 30 May 2021 06:39:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=bfNRD5AI1qfcGSrXLqIyxjC2o9Dl5x7HUL0GNJShUDI=; b=W94QaL8TSl2dnIk0tR7FJ1dXaD+HLgo3rqBOiymxVdKyfTbG675pOqAP59ycpnIFfI bIJ0hvrrnq95417riWGPjMePCKpS4ekVd1Scx7wWomnCutakqHcSNPz7iWYIr/g8Y3/j WkUMBF29lYRFCPEDhCReqt7qnccQDzCVuJ32gYOsuiAxdFAjqRVetzOU9tShnjpBOGGU oxk3hgozMwYoDk1/2PJkPe68oHvg8jWGcstfk4PmWftW3wvF7iDr0cfEu5Wzg+e7vVHv lI8B6Jg05YhraW1Lm5jj5uJhWx7J/y01FrTdZgoXB4nJdHCAQgUz3+LlYqNkRUyavmgO 0U3w== X-Gm-Message-State: AOAM533OI4OfojoUIXHC9vmeemVLKDd+5tiTvGqO8ijeQPwb/m/Bty8L 6xvw/N6HqEG4bokr6QYwizMDM31W/eOoYA== X-Google-Smtp-Source: ABdhPJwYZLj9BKdiSRWq7rNFcO4oU+eO3KimSlUTixOUFWg5T5BcIWNRz+BMcEfKq2GVxJT/Ov2lHw== X-Received: by 2002:a6b:8b48:: with SMTP id n69mr13573602iod.165.1622381959511; Sun, 30 May 2021 06:39:19 -0700 (PDT) Received: from smtpclient.apple (2603-6000-ca01-6f86-09fa-7c84-c275-9abf.res6.spectrum.com. [2603:6000:ca01:6f86:9fa:7c84:c275:9abf]) by smtp.gmail.com with ESMTPSA id r8sm6187207ile.25.2021.05.30.06.39.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 May 2021 06:39:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: "J. Hellenthal" Mime-Version: 1.0 (1.0) Subject: Re: sysrc bug Date: Sun, 30 May 2021 08:21:20 -0500 Message-Id: <9660FA98-3075-4047-B00F-F24F1656B778@dataix.net> References: Cc: freebsd-security@freebsd.org In-Reply-To: To: Fas Xmut X-Mailer: iPhone Mail (18F72) X-Rspamd-Queue-Id: 4FtKK46nZPz4lj4 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[dataix.net:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[dataix.net,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[protonmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::d31:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[dataix.net:s=net]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::d31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d31:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-security] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2021 13:39:22 -0000 Think this would be an extra security bug considering that gets wiped out th= en the system isn't going to come back online after a reboot =F0=9F=A4=AA Nice find !!! --=20 J. Hellenthal The fact that there's a highway to Hell but only a stairway to Heaven says a= lot about anticipated traffic volume. > On May 30, 2021, at 01:10, Fas Xmut via freebsd-security wrote: >=20 > =EF=BB=BFI don't know if it is a security bug or not. When I use sysrc tod= ay, the error operations emptied my /etc/rc.conf, that's a small disaster, b= ecause my /etc/rc.conf is updated day by day, but now, it is empty. >=20 > First, change your default root shell to sh/ksh or their derived shell. (I= have tested, csh will not trigger that bug). >=20 > Second, backup /etc/rc.conf to any other place. >=20 > Then do the following commands: >=20 > ------------------------------------------------------------------------ > # sysrc something_enable=3D"NO" > # sysrc something_enable=3D"YES >> " > awk: newline in string YES > ... at source line 1 > something_enable: NO -> YES > ------------------------------------------------------------------------ >=20 > Now see what is inside /etc/rc.conf ? Everything is empty! only one thing i= n it: >=20 > ------------------------------------------------------------------------ > something_enable=3D"YES > " > ------------------------------------------------------------------------ >=20 > Sent with [ProtonMail](https://protonmail.com) Secure Email. > _______________________________________________ > freebsd-security@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org= "