Submit #1023263: 360 (Qihoo 360) 360 Smart Camera (IPC) 6.3.0 ~ 6.3.2 OS Command Injectioninfo

Title360 (Qihoo 360) 360 Smart Camera (IPC) 6.3.0 ~ 6.3.2 OS Command Injection
Description# 360 Smart Camera (IPC) — OS Command Injection in the `timezone` Push Command | | | |---|---| | **Vendor** | 360 (Qihoo 360) | | **Product** | 360 Smart Camera (IPC) | | **Component** | `fs2/bin/iscm` — `on_push_message`, `timezone` branch | | **Affected versions** | 6.3.0 / 6.3.1 / 6.3.2 and earlier | | **Fixed version** | 6.4.0 | | **Affected models** | D603-2, D600-2, D606-6 (MIPS); cross-arch: D618 (ARM) | | **CWE** | CWE-78 Improper Neutralization of Special Elements used in an OS Command | | **CVSS 3.1** | 6.5 — `AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N` | ## Summary The `timezone` push handler validates only that the value is **exactly 6 characters** and that its first character is `+` or `-`. It then builds a shell command with the remaining characters unchecked, allowing command injection within a 6-byte payload. ## Root Cause ```c if (strlen(tz) != 6) goto out; /* length == 6 */ if (tz[0] != '+' && tz[0] != '-') goto out; /* first char only */ sprintf(buf, "echo GMT%s > %s", tz, "/etc/TZ"); /* tz[1..5] unvalidated */ system(buf); ``` A 6-byte payload such as `-;sh;#` is sufficient to obtain an interactive shell (the spawned shell reads subsequent commands from stdin). The ARM build of the same version is **more permissive**: `tz[0]` only toggles a sign and does **not** reject values that are neither `+` nor `-`, falling through to the sink unconditionally. ## Proof of Concept The value must be exactly 6 bytes and start with `+` or `-`: ```json { "command": "timezone", "tz": "-;sh;#" } ``` The resulting shell command is: ``` echo GMT-;sh;# > /etc/TZ ``` Everything after the first `;` executes. Because `sh` is spawned without arguments it reads subsequent commands from stdin, giving an interactive shell within the 6-byte constraint. ## Evidence - Command execution output and an interactive shell session captured from the emulated device component - Fix-side artifact: version 6.4.0 introduces a dedicated `check_timezone_parameter` helper enforcing `[+-][0-9]{2}:[0-9]{2}`; this symbol does not exist in 6.3.x ## Fix Recommendation 1. Replace string concatenation with parameterized execution (`execve(argv[])`). 2. Validate the timezone against a strict pattern before use. ## References Fixed by the vendor in 6.4.0. No public advisory. Evidence available on request.
Source⚠️ https://gist.github.com/gajgdm6-cpu/b238ba799968564773a70ad480f3e404
User
 xiaomao (UID 100096)
Submission10/10/2026 15:28 (2 months ago)
Moderation11/03/2026 17:24 (24 days later)
StatusAccepted
VulDB entry430445 [Qihoo 360 D603-2/D600-2/D606-6 up to 6.3.2 Timezone Push /fs2/bin/iscm on_push_message tz os command injection]
Points20

Might our Artificial Intelligence support you?

Check our Alexa App!