Article View: news.admin.peering
Article #3769Re: [addendum] Re: Is Rocksolid Light really compromised and insecure?
From: Billy G.
Date: Tue, 02 Sep 2025 23:44
Date: Tue, 02 Sep 2025 23:44
111 lines
5393 bytes
5393 bytes
On 02.09.25 22:26, Soul Patch wrote: > I am poking around the Rocksolid Light codebase. It would take a sizeable amount of work to fix some of the problems, but it is not insurmountable or gargantuan in scope, although there would be some tedium. It looks like the insecurities can be fixed if some of the attack vectors are gutted: > > * remove the file upload and storage feature except for MIME attachments > > * remove code for sqlite spool and force reversion to tradspool > > * replace all sqlite functions with plain text parsing functions with santizers > > * replace sqlite overview data with plaintext data store > > * sanitize / validate web form inputs on the server side before any data is processed > > * reject and don't process articles or control messages with badchars or invalid utf-8 > > * sanitize / validate nntp session commands more thoroughly > > * validate and santize BBS mail messages before passing them to further functions or to inboxes. > > * replace php pctnl functions with lower-privileged workarounds > > * add code to validate and sanitize badchars from being passed to logs, spamassassin, mail server > > * sandbox unencrypted nntp port 119 to localhost, forcing bigworld to use TLS in nntp-ssl.php > > * going forward commit to zero use of third-party sql / sqlite libraries, and instead create custom functions using PHP native code, relying on tradspool and text files the old Unix way. A properly organized file tree will work as well as a database, with less overhead, just requiring more code, and the main tradeoff is more complex processing versus simple database commands > > * going forward commit to a prefix-sorted tradspool tree instead of database message storage > > * have tested Rocksolid Light 'as is' for hundreds of newsgroups and it has managed to perform well so far, and since this application is not meant for serving tens of thousands of newsgroups these changes should have negligible impact on performance efficiency > > * after fixing the vulnerability vector bugs, begin stress testing by increasing the number of newsgroups and connected users pulling article data and benchmarking until performance upper limits are hit, then identify the bottle necks and optimize from there > > What am I missing so far? > > > Addendum: > > * configure all scripts and PHP files to prohibit any invocation as root user by checking to SUID / RUID at beginning of every script > > * prohibit running install scripts as root user, except to request root for registering init / systemd service for the sync job / cron job > > * add a script to automatically check file permissions, report discrepancies, and correct wrong permissions automatically > > * bundle with firejail / jailkit / lxd / chroot options including network shaping in the jail > > * bundle with inotify watch helpers to detect, report, and quarantine stray files or changed script files > > * bundle with optional Linux MAC options that can be set in a text config file > > * force install to a single user-owned directory either in /opt or $WEBROOT with .htaccess protections, instead of /etc /var or /run > > * slowly work on converting the shell installation scripts to pure PHP for a word-press like install from the web front end > > * assign IDs and access controls to the individual PHP functions, limiting their inputs and outputs on a per file basis > > >> > What am I missing so far? you did not try yet. touch some lines of rocksolid code and see how other parts of the world start breaking :D maybe easier to write clean from scratch but go ahead respect will be with you if you work your list! i stopped working here and i will not continue writing anymore php. https://github.com/go-while/rocksolid-light/pull/2/files this is the future: https://github.com/go-while/go-pugleaf -- ...... Billy G. (go-while) https://pugleaf.net @Newsgroup: rocksolid.nodes.help irc.pugleaf.net:6697 (SSL) #lounge discord: https://discord.gg/rECSbHHFzp
Technical Details
Message-ID:
<d0e80db8a2f769e958c2004b4fb0d904d7d50c97@usenet.pugleaf.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.pugleaf.net!ygg-srl.newsdeef.eu!srl.newsdeef.eu!reader-nyc.newsdeef.eu!.POSTED!not-for-mailReferences:
<104tuhe$2r60t$1@paganini.bofh.team> <20250712205507.6a4eda98@ryz.dorfdsl.de> <slrn1075ek3.2ag38.rayban@raybanana.net> <1097nak$2h3qd$1@paganini.bofh.team> <1097o03$2h3qd$2@paganini.bofh.team>Show Full Headers
Complete Article Headers
Message-ID: <d0e80db8a2f769e958c2004b4fb0d904d7d50c97@usenet.pugleaf.net> Subject: Re: [addendum] Re: Is Rocksolid Light really compromised and insecure? Date: Wed, 3 Sep 2025 00:44:07 +0100 From: "Billy G." <contact-5c2e-000@pugleaf.net> References: <104tuhe$2r60t$1@paganini.bofh.team> <20250712205507.6a4eda98@ryz.dorfdsl.de> <slrn1075ek3.2ag38.rayban@raybanana.net> <1097nak$2h3qd$1@paganini.bofh.team> <1097o03$2h3qd$2@paganini.bofh.team> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.pugleaf.net!ygg-srl.newsdeef.eu!srl.newsdeef.eu!reader-nyc.newsdeef.eu!.POSTED!not-for-mail Newsgroups: news.admin.peering Organization: github.com/go-while MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 2 Sep 2025 23:44:13 -0000 (UTC) Injection-Info: reader-nyc.newsdeef.eu; posting-account="sys-operator"; logging-data="1905165"; mail-complaints-to="abuse@newsdeef.eu"; posting-account="ggUZJXmrQBoB7mitoXQwdxqeYYnnDS0Ezkz+dO8ak5E"; In-Reply-To: <1097o03$2h3qd$2@paganini.bofh.team> Content-Language: en-US