Re: sysrc bug

"J. Hellenthal via freebsd-security" <[email protected]>
Newsgroups gmane.os.freebsd.security.general
Message-ID <[email protected]>
Think this would be an extra security bug considering that gets wiped out then the system isn't going to come back online after a reboot 🤪

Nice find !!!

-- 
 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 <[email protected]> wrote:
> 
> I don't know if it is a security bug or not. When I use sysrc today, the error operations emptied my /etc/rc.conf, that's a small disaster, because 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="NO"
> # sysrc something_enable="YES
>> "
> 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 thing in it:
> 
> ------------------------------------------------------------------------
> something_enable="YES
> "
> ------------------------------------------------------------------------
> 
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
> _______________________________________________
> [email protected] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-security
> To unsubscribe, send any mail to "[email protected]"
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.