Skip to content

43PUS7608/12 169.001: root-queue corrections and local access findings

Status: REPORTED for external static analysis on the verified TPN236E_236.006.169.001 image. The maintainer has not reproduced it. No device interaction, no live test, and no write to the field unit. The 169.001 artifact is the externally verified one in doc 35.

This note records issue #8. It corrects three statements in doc 35 and adds one local access finding. Every path described here needs physical access: a UART console, a USB stick, or the factory console. None is a remote entry.

Follow-up (2026-11-21). Issue #11 made the missing browser/idtv step concrete on the same unit. The USB flag opens CDP, an RPC method injects a shell command as idtv, and the customer_env.sh hook grants root. See the RPC-injection note.

Corrections to doc 35

Doc 35 statement Corrected finding
msg_server has no idtv_exec_t; the commented-out cmd_daemon has it. Both paths have idtv_exec_t in file_contexts (cmd_daemon line 1336, msg_server line 1337).
msg_server runs as idtv_t. run.sh:510-514 copies msg_server to /tmp and executes it there, so its runtime domain is initrc_t, not idtv_t. initrc_t is an unconfined_domain_type member.
cmd_daemon is commented out. cmd_daemon is active. data/nvt.app.ini has [apps] cmd_daemon=y; appmgr launches /mtd_apexe/board/cmd_daemon. The cp line at run.sh:167-171 is commented out, but that does not disable the appmgr launch.

Both msg_server (ftok("/tmp/msg", 0xff)) and cmd_daemon (ftok("/tmp/cmd", 0xff)) read a queue and pass the payload to system(). The queue pattern is a local root-execution design flaw, not an initial entry. The in-firmware senders mid_send_msg (libmid.so) and send_msg (libdev.so) run as idtv_t and are denied msg send by policy.30.

The factory debug console in libmgr_cust.so (CUl test) reads stdin and calls msgsnd (0x71d40-0x71dba, mtype=2, at most 256 bytes, no validation) into the root-exec queue. That requires access to the factory console. Treat it as a local privilege-escalation finding and use the private disclosure path. Do not publish a payload.

Serial console root login

Static evidence from fs-root:

  • etc/inittab:32 runs getty -L ttyS0 0 vt100 on ttyS0.
  • etc/passwd:1 has root:x:0:0:root:/root:/bin/sh.
  • etc/shadow:1 has root::::::::, an empty password field, not a locked one.
  • etc/securetty and etc/nologin are absent; /etc/pam.d/ is empty.

BusyBox 1.35 login_main (0x14248) treats the absent securetty as secure for UID 0. It sees the shadow field as empty and returns authenticated without calling bb_ask_noecho. Under policy.30, SELinux user root has sysadm_r/staff_r; the default is root:sysadm_r:sysadm_t.

This is INFERRED: if ttyS0 RX is usable and the console is reachable, the getty presents a root shell without a password. The hardware result in doc 07 was that RX received nothing on the tested unit. That test was on the 8000, not this TPN236E build. No live test was run here. Do not claim a working serial root path until RX and login are tested on the unit.

Browser CDP runtime flags

ap-root/board/iptables_conf.sh:81-87 accepts inbound TCP/UDP 7001, 7788, and 9222. On a default boot all three measured closed. The browser scripts explain why.

  • com.nvt.opera / 7788: apext-root/com.nvt.opera/nvt_opera_wayland.sh adds --remote-debugging-port=7788 only inside the if [ -f "$core_dir/nbrowser_log_to_file" ] branch. The default else branch omits it. core_dir is the first /media/sd* mount. A USB stick with nbrowser_log_to_file can therefore enable the port on the next browser launch.
  • com.tpv.opera / 7001: run_browser.sh defines --remote-debugging-port=7001 in OPTIONS, but execs browser.out without $OPTIONS. browser.out contains enable_debug_port, enable_devtools, /tmp/brctl_cmd, and --remote-debugging-port; the exact runtime path is not disassembled. The 9222 string is a legacy log label, not a listener.
  • Flag files: libsocmw.so can create or remove /mnt/browser/nettv/enable_debug_port and enable_devtools. The first is managed by SocMwFactoryMgr::FactorySetNetTVDebugFlag; the second by SocMwSystemMgr::SetSystemNettvlogEnable/Disable. Both live under /mnt/browser, which maps to /mtd_rwarea/browser.

The practical local path is therefore physical USB -> nbrowser_log_to_file -> browser launch with CDP on 7788 -> browser/idtv code execution -> write customer_env.sh or /swdl -> root on the next boot. The last steps are the existing idtv RW-hook chain. This is INFERRED; no live test has been run. It is not a remote entry: the USB stick must be inserted and the browser must launch. The default boot remains closed.

App groups and SELinux

fs-root/etc/group puts idtv in tty, disk, ttyS, video, audio, teec, fwupdate, gpio, nvtdrv, tkconfig, inputevt, and devusb. Unix DAC looks broad, but policy.30 narrows it:

  • /dev/mmcblk* is labeled removable_device_t; idtv_t has getattr ioctl lock open read on blk_file, but no write. Raw eMMC read is available to idtv; direct writes are denied.
  • force_ro is sysfs_t; idtv_t has read/open, no write.
  • /dev/ttyS2 is world-writable in run.sh:444, but idtv_t has only getattr on tty_device_t:chr_file.
  • idtv_t, nvtopera_t, and tpvopera_t can create/write idtv_data_t (customer_env.sh) and default_t (/swdl/*). Those are the existing root-on-reboot seams.

At the time of this note, the app-layer findings did not create a new initial entry. Issue #11 later supplied the physical USB flag entry (doc 42). The findings reduce the post-entry chain: any idtv execution already has the documented root hook.

/dev/ntkmem was also checked. KER_MEM_IOCtl copies a 0x28-byte struct and uses the CMA allocator; DDR_ioremap_read32 is called from initialization, not from the ioctl path. It is not an arbitrary physmem window.

core_helper.sh is not an entry vector

The USB volume-label injection hypothesis is refuted:

  1. mdev.conf:68 passes $MDEV $ACTION $LABEL, but kernel block uevents do not emit LABEL=, and BusyBox mdev does not probe labels. The third argument is empty, so USB partitions mount at /media/sdX1.
  2. POSIX /bin/sh field splitting and globbing on the unquoted expansions in core_helper.sh:72-86 do not execute command substitution or operators. /proc/self/mountstats octal-escapes whitespace.
  3. The gdb binary referenced at core_helper.sh:69,86 is absent.

core_helper.sh:43-45 does run modules/install_usb.sh as root on every non-whitelisted coredump, but the reported label path does not reach it. Keep that as a root-context code path to review, not an entry.

apexe_ext service layer

The apext.bin image is an NFSB header plus SquashFS (39,138 inodes). Findings:

  • /tmp/brctl_cmd reader found: com.tpv.opera/bin/browser.out references /tmp/brctl_cmd at file offset 448311. libnettvp writes it in idtv_t. The reader side exists; the remote chain from mqttOpenApp to COM_SwitchOnProcess is still not demonstrated.
  • Mosquitto: allow_anonymous true; loopback 11883; TLS 8883; loopback WebSocket 8083. The dynamic-security file lives under /mtd_rwarea, and anonymous clients can publish pairing/start/#, pairing/finish/#, deeplink/#, and subscribe to info; wildcard subscriptions are denied.
  • mqttv: v2.11.3, runs as idtv, logs to /dev/ttyS0, references a /mtd_rwarea QA bundle.
  • Node AirServer: the reported 7001/7002/7003 listeners are unverified. index.js creates a server but does not show explicit listen() calls at those ports.
  • Browser flags: com.nvt.opera adds --unsafely-treat-insecure-origin-as-secure=http://app.10ft.itv.com/eos/, --allow-file-access-from-files, and --allow-running-insecure-content. browser.out embeds a cache.zeasn.tv origin exception, file access, and --ignore-certificate-errors.
  • edfu/content/php: static XML/HTML only; no PHP interpreter in the image.

What this means

  • The three label corrections are real and doc 35 is updated.
  • The serial console and USB CDP paths are physical-access candidates, not remote entries. Neither was tested on hardware here. The serial path needs UART RX; the CDP path needs the USB flag and a browser launch.
  • msg_server/cmd_daemon remain local root queues. msg_server runs as initrc_t; cmd_daemon is active. The factory console is a local privilege-escalation finding and belongs in private disclosure.
  • core_helper is out as a USB label-injection vector. The idtv SELinux groups do not unlock block writes. The 1926 control surface is unchanged.
  • No remote entry was found. Level 3.5 on the owned lab was unchanged at the time of this note; the reusable carrier is now verified (2026-11-20; see doc 37).

Issue #8 status

The corrections and new findings are recorded here. Issue #8 can be closed after this note and doc 35 are updated. The factory console finding should go through the private security form, not a public exploit write-up.

Credit

External static report, issue #8, 2026-11-16. Read-only analysis of the externally verified 169.001 package; no device identifiers, raw captures, vendor firmware, or exploit payloads are reproduced.