Date: Mon, 31 May 2021 02:01:22 +0000 From: Fas Xmut <fasxmut@protonmail.com> To: Eugene Grosbein <eugen@grosbein.net> Cc: "freebsd-security@freebsd.org" <freebsd-security@freebsd.org> Subject: Re: sysrc (awk) bug Message-ID: <6YNQ4285ppiZ6viy28yztJUyMh7Pk0ke-lH_kRqbuRw-I3viTyQAEZrQ13MTEwAUd5s8Qd7xXi2PDpObhUa5GUatzo8-UdfvczaWtPZ47jw=@protonmail.com> In-Reply-To: <ae413c70-4fdc-f65c-1757-b1473c1a21b7@grosbein.net> References: <0J-hkv9PO-ZfjHO2kiEVatVRNdz0xTZ8pDMOvPreE53RFRsgyWHnU0U1IPO-mxNmswiB5KyGgO067-gLMA0PfW4Py3bBYllvQCBMTc2T8QE=@protonmail.com> <ae413c70-4fdc-f65c-1757-b1473c1a21b7@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
13.0-Release Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, May 30, 2021 1:43 PM, Eugene Grosbein <eugen@grosbein.net> wrote= : > 30.05.2021 11:36, Fas Xmut via freebsd-security wrote: > > > I don't know if it is a security bug or not. When I use sysrc today, th= e error operations emptied my /etc/rc.conf, that's a small disaster, becaus= e my /etc/rc.conf is updated day by day, but now, it is empty. > > First, change your default root shell to sh/ksh or their derived shell.= (I have tested, csh will not trigger that bug). > > Second, backup /etc/rc.conf to any other place. > > Then do the following commands: > > > > sysrc something_enable=3D"NO" > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > > sysrc something_enable=3D"YES > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > > > " > > > awk: newline in string YES > > > ... at source line 1 > > > something_enable: NO -> YES > > > > Now see what is inside /etc/rc.conf ? Everything is empty! only one thi= ng in it: > > > > something_enable=3D"YES > > " > > > > ------------------------ > > What is your FreeBSD version?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6YNQ4285ppiZ6viy28yztJUyMh7Pk0ke-lH_kRqbuRw-I3viTyQAEZrQ13MTEwAUd5s8Qd7xXi2PDpObhUa5GUatzo8-UdfvczaWtPZ47jw=>