security(shared-httpd): also remove status, info and every unused proxy/suexec/dbd/cache module
A tenant `RewriteRule ^ - [H=server-status|server-info]` binds the handler after any config section could pin it, and `RewriteRule ... http://x [P]` proxies to internal addresses (SSRF). Config cannot close those; removing the modules does. WHP renders only SetHandler proxy:fcgi, <Proxy balancer://> + BalancerMember fcgi:// + ProxySet lbmethod=byrequests and ProxyFCGISetEnvIf, so only proxy, proxy_fcgi, proxy_balancer, lbmethod_byrequests and slotmem_shm stay. Removed in addition to the earlier set: status, info, proxy_http, proxy_ajp, proxy_ftp, proxy_connect, proxy_scgi, proxy_uwsgi, proxy_wstunnel, proxy_fdpass, proxy_express, proxy_hcheck, lbmethod_bybusyness, lbmethod_bytraffic, lbmethod_heartbeat (+ mod_heartbeat/heartmonitor .so), suexec, dbd, authn_dbd, authz_dbd, cache, cache_disk, cache_socache, socache_dbm, socache_memcache, socache_redis. socache_shmcb stays (SSL). The gate derives its banned-module regex from one list. Tests: 26 gate cases (banned status/info/proxy_*/cache back, leftover .so, required lbmethod_byrequests/balancer missing) and a new live probe script (scripts/tests/httpd-exec-surface-probes.test.sh) that renders the real WHP template + drop-in and tries [H=lua-script|server-status|server-info], nested <If> CGI and [P] http/ws/ajp/ftp/scgi/uwsgi. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
0f8407c239
commit
990b3792bc
5 files changed
+195
-15
No files matched your search
@@ -58,8 +58,10 @@ RUN /scripts/httpd-h2-md-gate.sh remove && /scripts/httpd-h2-md-gate.sh check
|
||||
LABEL org.whp.httpd-h2-md="removed"
|
||||
|
||||
# Tenant isolation (WHP 2026-11-22): this one Apache serves every tenant, so nothing that
|
||||
# can execute code or follow DAV/userdir/SSI/CGI/Lua may exist in it. Build fails if any of
|
||||
# it returns, or if a module the platform needs went missing.
|
||||
# can execute code, expose server-status/server-info, proxy to a non-FastCGI backend ([P]
|
||||
# SSRF) or follow DAV/userdir/SSI/CGI/Lua may exist in it. Only proxy + proxy_fcgi
|
||||
# (+ balancer) stay. Build fails if any of it returns, or if a module the platform needs
|
||||
# went missing.
|
||||
# scripts/httpd-exec-surface-gate.sh. Last package step on purpose.
|
||||
RUN /scripts/httpd-exec-surface-gate.sh remove && /scripts/httpd-exec-surface-gate.sh check
|
||||
LABEL org.whp.httpd-exec-surface="removed"
|
||||
|
||||
Reference in new issue
Block a user