commit 8014df0d405ec7c719abd9d73b27bdbf9806c040ed5455579d3d84b2b6973c13 from: Henry Ford via: Stefan Sperling date: Sat Mar 14 20:02:18 2026 UTC prevent non-root users from blocking gotctl reload requests Patch by: Henry Ford The bug fixed here is as follows, in Henry's words: If a GOTD_IMSG_RELOAD message is sent by a non root user, then gotd(8) will deny the request. However, gotd(8) will accept a GOTD_IMSG_RELOAD_SECRETS message from any client regardless of their uid. After receiving a GOTD_IMSG_RELOAD_SECRETS message gotd(8) will not accept another such message until it receives a GOTD_IMSG_RELOAD message to complete the reload request. Thus, a non root user can block any future gotctl(8) reload requests from succeeding by sending a GOTD_IMSG_RELOAD_SECRETS message to gotd(8). You can reproduce this by running the following commands with gotd(8) running: $ gotctl reload -c /dev/null gotctl: reload: Operation not permitted # gotctl reload gotctl: received unexpected privsep message commit - 4adf9a5039c8b1ceaf7020883aa9d00d8bcf17610c7bad027c74ef82da626a00 commit + 8014df0d405ec7c719abd9d73b27bdbf9806c040ed5455579d3d84b2b6973c13 blob - 6ef51e8d4e9eb7d80c0bdbdd8bf85bfea4d79109d5a1984c02af8b2ab7d33cc7 blob + 58bc2370451ae7cfb8d5cbd8aa9dce6c9a953d727779b30e9e5a2aca18adf194 --- gotd/gotd.c +++ gotd/gotd.c @@ -983,6 +983,10 @@ gotd_request(int fd, short events, void *arg) err = stop_gotd(client); break; case GOTD_IMSG_RELOAD_SECRETS: + if (client->euid != 0) { + err = got_error_set_errno(EPERM, "reload"); + break; + } if (have_reload_secrets) { err = got_error(GOT_ERR_PRIVSEP_MSG); break;