Maximo Segundo FonrougeWriting

A week of patches

I run a few servers myself: small virtual machines that keep a business's ERP, its web pages and my own apps online. Nobody else watches them. So when a security flaw comes out, the job is mine.

In November, several came out at once.

First, nginx, the program that receives every visitor and passes them to the right site. Two bugs in its HTTP/2 code let anyone on the internet run code on the server, with no password. They were rated critical, and attack code was already public.

One server was affected. It ran the nginx that comes with Ubuntu, and Ubuntu's fix was not out yet. Waiting was not an option, and swapping nginx in a hurry could break fifteen sites. So that same day I turned off HTTP/2. Both bugs need it, and pages got only a little slower, with no downtime. In the meantime I tested the newer nginx against the real settings in a separate container, without touching the live server.

Two days later, the nightly security update installed Ubuntu's fix.

Then PHP. A critical flaw appeared in PHP-FPM, the part that runs PHP pages. I checked whether it was really in use instead of guessing: it was running, and four sites sent requests to it. The fix had come out after the nightly update, so I installed it by hand, at a quiet hour, and then opened every site, the ERP included, to make sure they still worked. The new kernel waited for the automatic restart at four in the morning.

Earlier that month, the audit tool for my own code had found four vulnerable libraries, three of them in the code that checks TLS certificates. I updated them, and nothing was released until the audit came back clean.

The other server was not affected by any of the server flaws. It has no nginx and no PHP. It uses a single web server, Caddy, and my apps. Fewer pieces means fewer things to patch.

A few things I keep from that week:

Automatic security updates every night are the base, not the plan. They only install what your Linux distribution has already released, and that can come days after the fix exists.

Know what is actually running. "PHP is installed" and "four sites depend on PHP" lead to very different decisions.

Have a cheap way to stop the bleeding, like turning off one feature, so the real fix can be done calmly and tested first.

And mixing two sources for the same program is a trap. One server had both Ubuntu's nginx and the official one available. The nightly update used one, and a manual update would have silently jumped to the other.

None of this is exciting. That is why it is easy to skip, and why a public form can end up full of hidden spam.