-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The mitigation ships in the function it overflows\n\nThe handler runs inside Tenda CX12L firmware V16.03.53.12, in the httpd binary that backs the router's administration web UI. Its job is to apply a Wi-Fi configuration that arrived as an HTTP POST: choose between a single broadcast SSID for both radios and a split 2.4 GHz / 5 GHz pair, take the operator's typed name, write it into the radio's runtime buffer. Six lines, in order, do the whole thing.\n\n```c\nchar ssid_5g[64];\nchar *p_par;\nchar *unity_enable;\n\np_par = websGetVar(wp, \"ssid\", \"\");\nunity_enable = websGetVar(wp, \"unity_enable\", \"\");\n\nif (atoi(unity_enable) == 1) {\n snprintf(ssid_5g, 0x40u, \"%s\", p_par);\n} else {\n sprintf(ssid_5g, \"%s_5G\", p_par);\n}\n```\n\n`websGetVar` is GoAhead's accessor for HTTP form parameters. It returns a pointer to a string the client posted. `p_par` here is the attacker's `ssid` value: any length, any contents, freeform until the server gates it. The function does not gate it.\n\nThe two branches both write into `ssid_5g`. They diverge on the choice of sink. In the `unity_enable == 1` branch the developer wrote `snprintf` with three arguments: the destination, the literal hex constant `0x40u`, the format string. `0x40u` is sixty-four, which is `sizeof(ssid_5g)`. The developer typed it. They had the buffer size in hand at the call site. They used it.\n\nEight lines below, in the `else` branch, the same developer reached for `sprintf` and a literal `\"%s_5G\"` format. No size, no bound, no check. Any `p_par` longer than sixty bytes overflows past the end of `ssid_5g` and continues writing into whatever the compiler chose to lay out next on the stack frame: saved registers, then the return address, then the caller's locals.\n\nThe runnable proof is four lines of Python.\n\n```python\nimport requests\nurl = \"http://192.168.15.142/goform/fast_setting_wifi_set\"\npayload = {'ssid': b'1500'*10000}\nrequests.post(url=url, data=payload)\n```\n\nForty thousand bytes of `ssid`. `unity_enable` is absent from the body, so `websGetVar` returns an empty string, so `atoi` returns zero, so the `else` branch fires. `sprintf` writes the attacker's pattern plus a `_5G` suffix into a sixty-four-byte stack slot and continues for thirty-nine thousand nine hundred and thirty-three bytes past it. The httpd worker handling the request crashes, takes down the management UI, and on a binary compiled the way Tenda has historically shipped its CX-family firmware (no PIE, no stack canary in the analyses of comparable Tenda httpd images that have been published over the last several years) leaves the saved return address sitting in attacker-chosen bytes.\n\nNVD's CVSS vector lists PR:L: the attacker needs some credential. On a CX12L that translates to a LAN session with the admin password, default `admin:admin` on a non-trivial number of deployed units, or a chain through one of the unauthenticated `/goform/` reach paths the same handler family has produced for years.\n\n## The same researcher had a second bug ready\n\nThe Mastodon notification that triggered this analysis was published on the day NVD assigned the CVE. The actual writeup is older. On 22 May 2026, a researcher operating as `cve-a` on GitHub opened two issues on a single tracker repository named `moist`. Issue #1 is what is now CVE-2026-11503. Issue #2 is the same firmware, the same `/goform/` family, a different handler.\n\n```c\nptr = malloc(0x19); /* twenty-five bytes on the heap */\nstrcpy(ptr + 2, websGetVar(wp, \"schedStartTime\", \"\"));\nstrcpy(ptr + 10, websGetVar(wp, \"schedEndTime\", \"\"));\n```\n\n`setSchedWifi`, the dispatcher for `/goform/openSchedWifi`, allocates twenty-five heap bytes, then copies two attacker-controlled HTTP form parameters into byte offsets two and ten of that allocation with `strcpy`. `strcpy` walks until it sees a null. Neither parameter carries a null until the attacker says it does. The PoC posts forty thousand bytes of `schedStartTime` and one byte of `schedEndTime` and the heap chunk's adjacent metadata corrupts.\n\nSame researcher. Same firmware version. Same `/goform/` namespace. Same week. The two issues differ in which sink the developer reached for (`sprintf` versus `strcpy`), which buffer they wrote into (a sixty-four-byte stack array versus a twenty-five-byte heap chunk), and which form parameter happens to be the trigger. The shape is the shape.\n\nIssue #2 has no CVE yet. The cadence here is: a researcher posts to a personal tracker, a third-party aggregator (in this case vuldb, submission 835648) files the CVE request, MITRE assigns, NVD publishes. There is no Tenda PSIRT entry. There is no vendor advisory. There is no `security.txt`. The vendor is named in the NVD record as Tenda, and the references list `https://www.tenda.com.cn/` as a bare hostname with no advisory path attached.\n\n## Tenda's `/goform/` namespace is a design-debt driver\n\nThis is the part nobody is explaining when the CVE goes out. CVE-2026-11503 is not unusual. Tenda's `/goform/` namespace has produced this exact bug class, in this exact shape, across more router models and more firmware versions than the average defender has time to enumerate. The same `websGetVar` accessor, the same per-handler decision about whether to length-check, the same firmware build pipeline that ships httpd binaries to embedded ARM and MIPS targets.\n\nThe pattern in our catalog is design-debt driver: a component whose architecture is fertile soil for one specific bug class, where each individual patch closes one instance and the substrate stays intact. Each Tenda `/goform/` handler is a freestanding C function that reads its form parameters with `websGetVar`, writes them into local buffers with whatever string API the author reached for first, and trusts the caller is friendly. Handlers are added one feature at a time. Each addition is one fresh chance for the developer to reach for `sprintf` instead of `snprintf`, or `strcpy` instead of `strncpy`. The maintenance team has been patching instances of this class since at least the early 2010s. The instance count keeps going up.\n\n`form_fast_setting_wifi_set` is the proof at function scale that the substrate repeats inside one handler. The same function ships the bounded call and the unbounded call side by side, in two adjacent branches of the same `if`. The developer knew the API they should have called. They called it in one branch and not the other. The patch will swap one `sprintf` for one `snprintf`. The next branch in the next handler is already written.\n\n## Seventeen days\n\n| Date | Event |\n|---|---|\n| 22 May 2026 | `cve-a/moist` issue #1 and issue #2 opened on GitHub. Full writeup including vulnerable function name, file path, parameter name, sink, and runnable Python PoC. |\n| 08 Jun 2026 | NVD publishes CVE-2026-11503 with CVSS 8.8 and references the vuldb submission. |\n| 08 Jun 2026 | OffSeq's Mastodon bot reposts the NVD entry. The notification that triggered this analysis. |\n\nSeventeen days between full public writeup and CVE assignment. During those seventeen days the CX12L firmware shipping to customers is unchanged. The disclosure that mattered, the one any attacker scraping GitHub issues found, happened on day zero. The CVE record published seventeen days later names the function the GitHub issue named, the file the GitHub issue named, the parameter the GitHub issue named, and references the vuldb submission whose technical content is a summary of the GitHub issue. The seventeen days were spent on paperwork.\n\nPoC: [cve-a/moist#1](https://github.com/cve-a/moist/issues/1)","closing_line":"The mitigation logic for this overflow ships in the function it overflows.","hook_md":"Tenda's `form_fast_setting_wifi_set` is one function in one binary on a consumer router that sits between a home network and the public internet. The function reads a Wi-Fi configuration form from `/goform/fast_setting_wifi_set`, branches on a flag the same form carries, and writes the caller's `ssid` argument into a sixty-four-byte stack buffer named `ssid_5g`. The single-SSID branch writes through `snprintf(ssid_5g, 0x40u, \"%s\", p_par)`. The dual-SSID branch writes through `sprintf(ssid_5g, \"%s_5G\", p_par)`. The buffer was the same buffer, the size was the same size, the developer's choice was the branch.\n\nCVE-2026-11503 is the dual-SSID branch.","post_id":585,"slug":"tenda-cx12l-snprintf-and-sprintf-into-the-same-buffer","title":"CVE-2026-11503: Tenda CX12L Called snprintf In One Branch And sprintf In The Other. Same Buffer.","type":"initial","unreadable_sentence":"The mitigation logic for this overflow ships in the function it overflows."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCar1wyQAKCRDeZjl4jgkQ Jt/JAP4kK1hx7We2jAxXvb9W0Wutl6yWIDfSKGiADjTh7obM3wD/QqTZ2ONIe0tu 8BumJyl21W4V9SyUUHvDjv3yKZ3wDQM= =linN -----END PGP SIGNATURE-----