diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-30 12:18:53 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-30 12:18:53 +0300 |
| commit | 77c23e337ae5b4c0d37bea153dd1497fb3d3507b (patch) | |
| tree | 122a7b34b83d762cfb617921fda579eab10a6adc /yhttpd/src | |
| parent | 11aa2791771b6d8b87605511de146e4dd4cdef6e (diff) | |
Fix unauth operator escalation -> /exec RCE
In guest/no-DB mode (Mode A, no authentication) chat::login granted
operator status (rang 0) to anyone who logged in with the nick matching
chat.defaultop ('Snoop'). An operator can run /exec (mods/commands/
yc_exec.cpp) which does popen() on an attacker-controlled shell string,
i.e. unauth -> RCE, and /set to re-enable disabled commands.
Fix: gate the defaultop grant on p_user->get_is_reg(). In Mode A
is_reg is only ever set under #ifdef DATABASE (compiled out), so no
guest can become operator; the only set_status(0) path is now dead.
Registered defaultops still get op once DB auth (Mode B) is enabled.
Defense-in-depth (per independent review): also physically omit
mods/commands/yc_exec.so from the revival image so the popen RCE
primitive is absent, not merely unreachable.
Verified in a container: logging in as 'Snoop' no longer grants op
(/exec returns 'No such command', no command output); /time and normal
guest use still work. Builds clean. Independent fresh-context review:
APPROVE-WITH-NITS; the drop-yc_exec.so hardening was applied; blanking
chat.defaultop was deliberately skipped to preserve the Mode B
bootstrap-op path.
Diffstat (limited to 'yhttpd/src')
0 files changed, 0 insertions, 0 deletions
