Hello,
This is a follow-up to RUTX50 CLI Broken. I can confirm the same bug on a CAP700 (ALTOS) — so this is not RUTX-specific. Below is a full diagnosis with a deterministic reproducer.
Device info:
- Model: CAP700 (ALTOS)
- Firmware: CAP7_R_00.07.24 (build 1309bb0f248, build date 2026-07-01)
- Kernel: 5.15.144-perf+
- History: WebUI CLI has never worked on this unit — through 07.22.3 → 07.23.7 → 07.24 (all upgrades performed via WebUI/RMS, keeping settings)
Symptom: CLI page loads normally, but clicking “Connect” immediately results in “Session closed”. No input is ever possible. SSH works 100% fine.
Architecture note (CAP700): the shellinabox package on this platform ships no shellinaboxd daemon. Its file list is only:
/etc/uci-defaults/7.22/99_cli_update
/etc/init.d/shellinabox
/usr/lib/uhttpd_cli.so
/etc/config/cli
So the web CLI runs as a uhttpd plugin (uhttpd_cli.so), served by the main uhttpd instance (-w /cgi-bin/cli).
Deterministic reproducer (via SSH, works every time):
# Step 1 - create a CLI session: works, returns HTTP 200 + JSON
S=$(curl -s -d "width=80&height=24" http://127.0.0.1/cgi-bin/cli | sed 's/.*"session":"\([^"]*\)".*/\1/')
echo "$S"
# -> e.g. Ye2w642Yb1icOmKEnNoLtA
# Step 2 - continue the session: uhttpd dies instantly
curl -i -d "session=$S&width=80&height=24" http://127.0.0.1/cgi-bin/cli
# -> curl: (7) Failed to connect to 127.0.0.1 port 80 after 0 ms: Error
After step 2, uhttpd is gone and procd respawns it (observed PID change 27971 → 28260 between ps and netstat). The respawned instance has an empty session list — which is exactly what the browser reports as “Session closed”, and it also invalidates the WebUI login session (explains the 401 cascade on /api/session/status I had previously diagnosed).
Crash signature confirmed: unlike on RUTX50, on CAP700 the crash is silent — nothing in logread and no kernel oops in dmesg. To capture it, I started an isolated foreground instance:
/usr/sbin/uhttpd -f -p 127.0.0.1:8080 -h /www -x /cgi-bin -w /cgi-bin/cli
Running the same two-step reproducer against port 8080 kills it with a plain:
Segmentation fault
printed to the console. So it is the same class of crash as the RUTX50 kernel oops (NULL deref during session handling) — SIGSEGV in uhttpd when processing a CLI session continuation request. Session creation always succeeds; the crash happens on the first request that references an existing session ID.
Additional data points:
- 100% reproducible, on every attempt, from localhost and from LAN alike — so authentication, source IP,
http_keepaliveand firewall settings are not a factor (I had previously testedhttp_keepalivechanges with no effect). /etc/config/cliis default (enable '1',shell_limit '5').- The bug has survived three firmware versions upgraded via WebUI/RMS.
Questions:
- Since the workaround recommended in the RUTX50 thread is reflashing from bootloader mode: can you confirm this procedure is supported and safe on CAP700/ALTOS? (The CAP700 wiki does include a “Bootloader menu” section under Device Recovery Options, but an explicit confirmation for this platform would be appreciated.)
- Please pass to R&D that the affected code is shared across platforms (RUTX and ALTOS at minimum) — the crash is in the uhttpd CLI plugin (
uhttpd_cli.soon CAP700) on session continuation.
Best regards,
XynthCode