Skip to content

Android app: camex 4.1.2, the tunnel takes connections only to the app's own page (1.47.6) - #101

Merged
compot-dev merged 1 commit into
mainfrom
camex-4.1.2
Nov 18, 2026
Merged

compot-dev merged 1 commit into
mainfrom
camex-4.1.2

Conversation

@compot-dev

Copy link
Copy Markdown
Collaborator

Updates bundles/camex to camex 4.1.2 (OpenIPC/camex#187): a new TCP connection from the tunnel reaches only web_port, and only when the app's own socket listens there; anything else gets a TCP reset. With several apps that embed camex on one device, one app's tunnel could otherwise serve another app's page on the same port.

The app already passes its page's port (8085 by default) as web_port, so no app change is needed. The release build (R8) keeps CamexVpnService.ownsListener() through camex's consumer-rules.pro; checked in the release dex.

Version 1.47.6, CHANGELOG entry.

Tests, local in Docker:

  • tests/run.sh: all passed; make without warnings
  • gradle assembleDebug lintDebug assembleRelease: OK
  • tests/android/remote-e2e.sh (the page through a camex tunnel): API 34 (getConnectionOwnerUid) 11 passed, API 21 (/proc/net/tcp) 11 passed

🤖 Generated with Claude Code

…p's own page (1.47.6)

bundles/camex on camex 4.1.2 (53c3dd8): a new TCP connection from the tunnel passes only to
web_port and only when the app's own socket listens there; any other gets a reset. The app
already gives the library its page's port as web_port. The release build keeps
CamexVpnService.ownsListener() (camex's consumer-rules.pro), checked in its dex.

Tests: tests/run.sh, assembleDebug lintDebug assembleRelease, tests/android/remote-e2e.sh
on API 34 and 21 (11 passed each).

Co-Authored-By: Claude <noreply@anthropic.com>
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Restrict Android tunnel connections to the app’s own web page

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Upgrade camex to 4.1.2 so tunnel connections reach only the app-owned listener on its web port.
• Reject other tunnel destinations with a TCP reset, preventing cross-app page access.
• Bump the release version to 1.47.6 and document the fix.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The camex tunnel, RemoteService, and the native web server jointly implement one bounded operator behavior: reaching microsnander's web page through the configured tunnel.
  • The changed submodule is the transport hop, while the inspected caller supplies this app's web port and starts the tunnel; these are implementation hops of the same capability, not independent capabilities.
  • Co-located apps are an isolation condition of this same integration rather than a separate product scope.
  • The affected outcome is the same bounded tunnel integration as the permissive-check scenario: an operator reaches the microsnander page through camex.
  • The changed transport check and the Android service's configured web port are successive hops in that one behavior, not independent functional scopes.
Sources

CHANGELOG.md[7-12]

## 1.47.6 — 2026-11-18

- Android app: `bundles/camex` on camex 4.1.2: the tunnel takes a new TCP connection only to the
  app's own web page (its port, a socket of the app); any other gets a reset. Before, with another
  app on the device that embeds camex, its tunnel could serve this app's page, or this tunnel
  another app's page on the same port.
Behavioral complexity 🟡 Medium 🧩 Interacting branches

  • Before: a TCP tunnel connection could be routed by the shared port, including in the presence of another camex-embedding app.
  • After: each new connection must distinguish the microsnander web-page socket from other sockets and reset the latter.
  • New correctness condition: the ownership decision must preserve valid microsnander connections while rejecting same-port connections for co-located apps, across the connection setup and reset paths.
  • This is an interaction between endpoint identity, same-port coexistence, and connection lifecycle—not merely reuse of the existing tunnel or web-port configuration.
Sources

CHANGELOG.md[7-12]

## 1.47.6 — 2026-11-18

- Android app: `bundles/camex` on camex 4.1.2: the tunnel takes a new TCP connection only to the
  app's own web page (its port, a socket of the app); any other gets a reset. Before, with another
  app on the device that embeds camex, its tunnel could serve this app's page, or this tunnel
  another app's page on the same port.
Potential damage 🔴 High 🩹 Confidentiality

  • If the destination check is too permissive, the tunnel can expose a different app's web page or expose microsnander's page through another app's tunnel.
  • The microsnander page is a remote control surface for a USB programmer and may expose dumps or other page data; this is an unauthorized cross-application disclosure/control-boundary failure, not merely a cosmetic routing error.
  • Recovery requires correcting the deployed app/submodule and terminating affected tunnel connections; reverting code does not undo any page data already disclosed or actions already performed.
  • Code rollback or an updated app can stop future misrouting, but it cannot recall data already served or automatically compensate for operations performed through the wrong page.
  • No automatic repair worker for such exposure is shown.
  • Equal business importance is assumed because no business-criticality declaration was supplied.
Sources

CHANGELOG.md[7-12]

## 1.47.6 — 2026-11-18

- Android app: `bundles/camex` on camex 4.1.2: the tunnel takes a new TCP connection only to the
  app's own web page (its port, a socket of the app); any other gets a reset. Before, with another
  app on the device that embeds camex, its tunnel could serve this app's page, or this tunnel
  another app's page on the same port.
Assessed commit 4b91fe5
Diagram

graph TD
  A["Camex tunnel"] --> B{"Port matches?"} -- "yes" --> C{"Own listener?"} -- "yes" --> D["App web page"]
  B -- "no" --> E["TCP reset"]
  C -- "no" --> E
Loading
High-Level Assessment

Pinning the camex release is appropriate because camex handles incoming tunnel connections, and the app already supplies its page port as web_port. Filtering at the page layer would not prevent a tunnel from reaching another app’s listener.

Files changed (3) +9 / -2

Documentation (1) +7 / -0
CHANGELOG.mdDocument the Android tunnel isolation fix +7/-0

Document the Android tunnel isolation fix

• Adds the 1.47.6 entry describing the camex upgrade, app-owned listener restriction, and cross-app access it prevents.

CHANGELOG.md

Other (2) +2 / -2
camexPin camex 4.1.2 +1/-1

Pin camex 4.1.2

• Moves the camex submodule to commit 53c3dd86, bringing in tunnel-side checks for the configured web port and app-owned listener.

bundles/camex

main.cSet release version to 1.47.6 +1/-1

Set release version to 1.47.6

• Changes the version constant from 1.47.5 to 1.47.6.

src/main.c

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@compot-dev
compot-dev merged commit b045223 into main Nov 18, 2026
9 checks passed
@compot-dev
compot-dev deleted the camex-4.1.2 branch November 18, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant