insufficient security settings for nginx systemd services
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| nginx (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned | ||
Bug Description
Same problem I just reported for postfix Bug #2136123 :
Hi,
on a 24.04 server I observed, that
/usr/lib/
doesn't use any of the security features and options systemd provides.
In contrast, dovecot package's does it better:
/usr/lib/
PrivateTmp=true
NonBlocking=yes
ProtectSystem=full
ProtectHome=no
PrivateDevices=true
LimitNOFILE=65535
which is not even complete, there's more in man systemd.exec , e.g. PrivateIPC (especially everything that starts with Protect* and Private*
A service that is typically exposed open to the world and permanently under heavy attack as a webserver, the security options systemd offers should really be used, for good reasons.
Same applies to many other packages.
Maybe it's a good idea to require every *.service unit file in debian/ubuntu packages to contain settings (even if they just set =no), and to make to package building tools spit out warnings if not.
I'd recommend to take more care about this for 26.04 LTS.
regards
| Changed in nginx (Ubuntu): | |
| status: | New → Confirmed |
| information type: | Private Security → Public Security |
| Changed in nginx (Ubuntu): | |
| importance: | Undecided → Wishlist |

Basically, go through the whole SANDBOXING chapter in man systemd.exec.