Skip to content

Commit 226c925

Browse files
authored
docs: add deployment assumptions, security model, and build troubleshooting steps (#54)
* docs: add pip --break-system-packages and nasm troubleshooting steps * docs: frame virtual-display packages as optional example, not a dependency * docs: add deployment assumptions and security model Document the dedicated-switch trust boundary raised in the SDLE review: - New docs/assumptions.md covering the TX host / dedicated L2 switch / receiver topology inside the locked cabinet, the deployment assumptions the security model depends on, the security properties the toolkit does not provide (security follows MTL and ST 2110, offloaded to physical and L2 isolation), and the residual risk with mitigations. - Link the new document from the README overview and from Security.md, which now also states the in-scope and out-of-scope components. * docs: pin MTL references to the merged commit id Replace the ffmpeg-plugin-extra-pixel-format tag with commit 7bee24231c864d12da6db2c2ffbfd3986717af5a in the clone instructions and in all MTL documentation links, so the build steps reference a fixed commit rather than a movable tag. Addresses PR review feedback. * ci: pin MTL build to a commit id and extend daily libFuzzer run - environment-check: rename the mtl-version input to mtl-commit and default it to 7bee24231c864d12da6db2c2ffbfd3986717af5a, matching the commit the README now documents. The env cache key picks up the new value automatically, so runners rebuild instead of restoring a stale MTL. - daily_build: raise the libFuzzer run from 300s to 7200s per sanitizer mode and extend the job timeout to 300 minutes to cover both modes plus the builds. * ci: set libFuzzer timeout to 2.3h; docs: 12-bit and multi-NIC build notes - daily_build: libFuzzer runs 3600s per sanitizer mode (~2h total) with a 138 minute job timeout. - README: 12-bit pix_fmts require MTL and FFmpeg to both be built from the pinned commit, since the plugin sources are compiled into libavdevice. - README: drop the stale instruction to hand-patch mtl_common.h for p2_port..p7_port; those AVOptions are present at the pinned commit, so 8 NICs work with the default FFmpeg TX path unpatched. * ci: run daily AFL fuzzing for 2h and refresh the fuzz corpus - afl-fuzz job: max-seconds 300 -> 7200 (single AFL run, so 2h total) and timeout-minutes 25 -> 138 to leave headroom for install and build. - Corpus seeds were written against an older schema: fps/fmt were placed in the video object but the parser reads them from tx_video, so the tx_video branch was never exercised. Moved them and added scale_width/scale_height. - Added nic_index to interfaces[] and tx_sessions[]. - New seeds for parameters with no coverage: ptp_config.json (ptp enable/pi/ unicast booleans), screen_capture.json (input_mode/screen_input) and multi_nic.json (multiple interfaces, 12-bit fmt, session-to-NIC mapping). * fuzz: add corpus seeds for the remaining supported pixel formats The corpus covered only 4 of the 7 fmt values accepted by validate_tx_config, so the yuv444p10le, gbrp10le and yuv422p12le branches (and their AV_PIX_FMT mappings) were never reached from a seed. Adds one seed per missing format; the yuv422p12le seed also covers ptp.unicast=true and payload_type at its upper bound (255).
1 parent 60bfb92 commit 226c925

13 files changed

Lines changed: 288 additions & 33 deletions

File tree

.github/actions/environment-check/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ inputs:
1111
description: 'DPDK version to build'
1212
required: false
1313
default: '25.11'
14-
mtl-version:
15-
description: 'MTL release tag to build'
14+
mtl-commit:
15+
description: 'MTL commit ID to build'
1616
required: false
17-
default: 'ffmpeg-plugin-extra-pixel-format'
17+
default: '7bee24231c864d12da6db2c2ffbfd3986717af5a'
1818
ffmpeg-version:
1919
description: 'FFmpeg release branch to build'
2020
required: false
@@ -37,7 +37,7 @@ runs:
3737
path: |
3838
${{ runner.temp }}/dvledtx-deps
3939
${{ runner.temp }}/mtl-source
40-
key: env-dpdk-${{ inputs.dpdk-version }}-mtl-${{ inputs.mtl-version }}-ffmpeg-${{ inputs.ffmpeg-version }}-v${{ inputs.env-cache-version }}-${{ runner.os }}
40+
key: env-dpdk-${{ inputs.dpdk-version }}-mtl-${{ inputs.mtl-commit }}-ffmpeg-${{ inputs.ffmpeg-version }}-v${{ inputs.env-cache-version }}-${{ runner.os }}
4141

4242
- name: Deploy cache to system
4343
if: steps.env-cache.outputs.cache-hit == 'true'
@@ -165,7 +165,7 @@ runs:
165165
shell: bash
166166
env:
167167
DPDK_VERSION: ${{ inputs.dpdk-version }}
168-
MTL_VERSION: ${{ inputs.mtl-version }}
168+
MTL_COMMIT: ${{ inputs.mtl-commit }}
169169
run: |
170170
echo "===== DPDK Setup ====="
171171
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}
@@ -177,7 +177,7 @@ runs:
177177
MTL_SOURCE="$RUNNER_TEMP/mtl-source"
178178
if [ ! -d "$MTL_SOURCE" ]; then
179179
git clone https://github.com/OpenVisualCloud/Media-Transport-Library.git "$MTL_SOURCE"
180-
cd "$MTL_SOURCE" && git checkout "$MTL_VERSION"
180+
cd "$MTL_SOURCE" && git checkout "$MTL_COMMIT"
181181
fi
182182
cd "$RUNNER_TEMP"
183183
git clone https://github.com/DPDK/dpdk.git
@@ -195,19 +195,19 @@ runs:
195195
- name: Build and install MTL
196196
shell: bash
197197
env:
198-
MTL_VERSION: ${{ inputs.mtl-version }}
198+
MTL_COMMIT: ${{ inputs.mtl-commit }}
199199
run: |
200200
echo "===== MTL Setup ====="
201201
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}
202202
if pkg-config --exists mtl 2>/dev/null; then
203203
echo " [OK] mtl ($(pkg-config --modversion mtl)) — skipping build (cached)"
204204
exit 0
205205
fi
206-
echo " Building MTL $MTL_VERSION from source..."
206+
echo " Building MTL $MTL_COMMIT from source..."
207207
MTL_SOURCE="$RUNNER_TEMP/mtl-source"
208208
if [ ! -d "$MTL_SOURCE" ]; then
209209
git clone https://github.com/OpenVisualCloud/Media-Transport-Library.git "$MTL_SOURCE"
210-
cd "$MTL_SOURCE" && git checkout "$MTL_VERSION"
210+
cd "$MTL_SOURCE" && git checkout "$MTL_COMMIT"
211211
fi
212212
cd "$MTL_SOURCE"
213213
./build.sh
@@ -241,7 +241,7 @@ runs:
241241
shell: bash
242242
env:
243243
FFMPEG_VERSION: ${{ inputs.ffmpeg-version }}
244-
MTL_VERSION: ${{ inputs.mtl-version }}
244+
MTL_COMMIT: ${{ inputs.mtl-commit }}
245245
run: |
246246
echo "===== FFmpeg Setup ====="
247247
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}
@@ -347,4 +347,4 @@ runs:
347347
path: |
348348
${{ runner.temp }}/dvledtx-deps
349349
${{ runner.temp }}/mtl-source
350-
key: env-dpdk-${{ inputs.dpdk-version }}-mtl-${{ inputs.mtl-version }}-ffmpeg-${{ inputs.ffmpeg-version }}-v${{ inputs.env-cache-version }}-${{ runner.os }}
350+
key: env-dpdk-${{ inputs.dpdk-version }}-mtl-${{ inputs.mtl-commit }}-ffmpeg-${{ inputs.ffmpeg-version }}-v${{ inputs.env-cache-version }}-${{ runner.os }}

.github/workflows/daily_build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ jobs:
7979
afl-fuzz:
8080
name: Daily AFL Fuzz
8181
runs-on: ubuntu-latest
82-
timeout-minutes: 25
82+
# 2h of fuzzing plus headroom for dependency install and the harness build.
83+
timeout-minutes: 138
8384
permissions:
8485
contents: read
8586

@@ -94,7 +95,7 @@ jobs:
9495
- name: AFL Fuzz
9596
uses: ./.github/actions/analysis/afl-fuzz
9697
with:
97-
max-seconds: '300'
98+
max-seconds: '7200'
9899

99100
- name: Upload AFL fuzzing results
100101
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -107,7 +108,9 @@ jobs:
107108
libfuzzer:
108109
name: Daily libFuzzer
109110
runs-on: ubuntu-latest
110-
timeout-minutes: 30
111+
# max-seconds applies per sanitizer mode (ASan + UBSan), so the fuzzing
112+
# itself takes ~2h; the rest covers the two builds.
113+
timeout-minutes: 138
111114
permissions:
112115
contents: read
113116

@@ -122,7 +125,7 @@ jobs:
122125
- name: libFuzzer
123126
uses: ./.github/actions/analysis/libfuzzer
124127
with:
125-
max-seconds: '300'
128+
max-seconds: '3600'
126129

127130
- name: Upload libFuzzer corpora
128131
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

README.md

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
## Table of Contents
1111

1212
- [Overview](#overview)
13+
- [Deployment Security Model](#deployment-security-model)
1314
- [Notices](#notices)
1415
- [Features](#features)
1516
- [Building](#building)
@@ -56,6 +57,21 @@ dvledtx reads a video source file (e.g., MP4), decodes it using FFmpeg, and tran
5657
| **Memory** | Hugepages configured (typically 2GB+) |
5758
| **Kernel** | IOMMU and VFIO support enabled |
5859

60+
### Deployment Security Model
61+
62+
dvledtx is intended for deployment on a physically secured, network-isolated media segment: the
63+
TX host, a dedicated L2 switch and the receivers all sit inside a locked cabinet, with all NICs
64+
on the TX host used for transmission onto that switch.
65+
66+
The transport (SMPTE ST 2110-20) and its PTP timing provide no authentication, encryption or
67+
integrity protection — security is delegated to MTL/ST 2110 and to physical and Layer 2
68+
isolation. Integrators must therefore verify the deployment assumptions before relying on this
69+
model.
70+
71+
See **[Deployment Assumptions and Security Model](docs/assumptions.md)** for the trust boundary,
72+
the required deployment assumptions, the security properties the toolkit does not provide, and
73+
the residual risk and mitigations.
74+
5975
## Notices
6076

6177
### FFmpeg
@@ -82,20 +98,20 @@ FFmpeg is an open source project licensed under LGPL and GPL. See https://www.ff
8298
> **Note:** This toolkit has been validated against **Ubuntu 22.04 LTS** but should work on Ubuntu 24.04 LTS and higher versions.
8399
84100
- Ubuntu [22.04](https://releases.ubuntu.com/jammy/) or [24.04](https://releases.ubuntu.com/noble/) LTS
85-
- [Media Transport Library (MTL) v26.01+](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/build.md)
101+
- [Media Transport Library (MTL) v26.01+](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/build.md)
86102
- Follow these steps
87-
- [Install APT packages](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/build.md#111-ubuntudebian)
103+
- [Install APT packages](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/build.md#111-ubuntudebian)
88104
- Clone Media-Transport-Library
89105
```
90106
git clone https://github.com/OpenVisualCloud/Media-Transport-Library.git
91107
cd Media-Transport-Library
92-
git checkout ffmpeg-plugin-extra-pixel-format
108+
git checkout 7bee24231c864d12da6db2c2ffbfd3986717af5a
93109
cd ..
94110
export mtl_source_code=${PWD}/Media-Transport-Library
95111
```
96-
- [Build and install DPDK](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/build.md#2-dpdk-build-and-install)
97-
- [Build and install MTL](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/build.md#3-build-media-transport-library-and-app)
98-
- [FFmpeg 7.0 with MTL Plugin](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/ecosystem/ffmpeg_plugin/README.md#1-build)
112+
- [Build and install DPDK](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/build.md#2-dpdk-build-and-install)
113+
- [Build and install MTL](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/build.md#3-build-media-transport-library-and-app)
114+
- [FFmpeg 7.0 with MTL Plugin](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/ecosystem/ffmpeg_plugin/README.md#1-build)
99115
- **Screen capture support (`input_mode: screen_capture`) requires FFmpeg's `x11grab` device.** It is auto-detected and compiled in by FFmpeg's `./configure` script, but only if these packages are installed *before* building FFmpeg:
100116
```bash
101117
sudo apt-get install -y libx11-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev
@@ -106,11 +122,9 @@ FFmpeg is an open source project licensed under LGPL and GPL. See https://www.ff
106122
```
107123
If this prints nothing, FFmpeg needs to be reconfigured/rebuilt after installing the packages above — screen capture will otherwise fail at runtime with `x11grab input format not found`.
108124
- **`x11grab` only works against an X11 (Xorg) display, not Wayland** — see [Ensuring an X11 session](#ensuring-an-x11-session-required-for-screen-capture) below if you're capturing from a machine's own physical desktop session.
109-
- **Headless machines (no physical monitor)** additionally need a virtual display to capture from — see [Screen capture on a headless machine](#screen-capture-on-a-headless-machine-no-physical-monitor) below, which requires:
110-
```bash
111-
sudo apt-get install -y xserver-xorg-video-dummy ubuntu-desktop
112-
```
113-
- The stock `mtl_st20p` muxer only exposes `p_port`/`r_port` (2 physical NIC ports). To use more than 2 NICs with the default (non-`ENABLE_MTL_TX`) build, the plugin's `libavdevice/mtl_common.h` must be patched to add `p2_port`..`p7_port` (and matching `p2_sip`..`p7_sip`) AVOptions mapped to `devArgs.port[MTL_PORT_2..MTL_PORT_7]` / `devArgs.sip[...]`, then FFmpeg rebuilt and reinstalled. Without this patch, `nic_count` is effectively capped at 2 for the FFmpeg TX path (the `ENABLE_MTL_TX` direct-pipeline build already supports up to 8 NICs without any patch).
125+
- **Headless machines (no physical monitor)** additionally need a virtual display to capture from. This is an optional, environment-specific setup — not a dependency of dvledtx — so it is documented as an example in [Screen capture on a headless machine](#screen-capture-on-a-headless-machine-no-physical-monitor) below.
126+
- **12-bit formats (`yuv422p12le`, `yuv444p12le`, `gbrp12le`) require both MTL and FFmpeg to be built from the pinned commit above.** The plugin sources are copied into FFmpeg's `libavdevice/` and compiled in, so rebuilding MTL alone is not enough — FFmpeg must be rebuilt against the same MTL commit or these formats are rejected at session setup.
127+
- At the pinned commit the `mtl_st20p` muxer exposes `p_port`/`r_port` plus `p2_port`..`p7_port` (and matching `p2_sip`..`p7_sip`), so up to 8 NICs work with the default (non-`ENABLE_MTL_TX`) build with no local patching. Older MTL revisions exposed only `p_port`/`r_port`, which capped `nic_count` at 2 for the FFmpeg TX path; the `ENABLE_MTL_TX` direct-pipeline build has always supported up to 8 NICs.
114128
115129
### Build Steps
116130
@@ -135,8 +149,8 @@ The built binary will be available at `build/dvledtx`.
135149
### Binding Ethernet Controller to DPDK PMD and Hugepage Setup
136150

137151
- Ensure VFIO group exists [follow](#vfio-group-setup)
138-
- [DPDK PMD Setup](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/run.md#3-dpdk-pmd-setup)
139-
- [Hugepage Setup](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/ffmpeg-plugin-extra-pixel-format/doc/run.md#4-setup-hugepage)
152+
- [DPDK PMD Setup](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/run.md#3-dpdk-pmd-setup)
153+
- [Hugepage Setup](https://github.com/OpenVisualCloud/Media-Transport-Library/blob/7bee24231c864d12da6db2c2ffbfd3986717af5a/doc/run.md#4-setup-hugepage)
140154

141155
### JSON Configuration
142156

@@ -250,7 +264,12 @@ To capture from a machine's own physical display, make sure that desktop session
250264

251265
`x11grab` needs a real X11 display to attach to — it does not work against a raw framebuffer or DRM device. On a machine with no monitor connected, create a virtual display using Xorg with the `dummy` video driver and run a desktop session on it so there's actual content to capture. Unlike Xvfb, a real Xorg server claims physical input devices — your keyboard and mouse work directly on the virtual display.
252266

253-
1. **Install prerequisites** (once): see [Software Requirements](#software-requirements) for the `xserver-xorg-video-dummy`/`ubuntu-desktop` packages and the `x11grab`-enabled FFmpeg build.
267+
> The packages below are **not dvledtx dependencies** — they are only needed to construct a virtual display on a headless host. The following is an example of one way to set this up on Ubuntu; adapt it to your environment as needed.
268+
269+
1. **Install the virtual-display packages** (once), along with the `x11grab`-enabled FFmpeg build. As an example, on Ubuntu:
270+
```bash
271+
sudo apt-get install -y xserver-xorg-video-dummy ubuntu-desktop
272+
```
254273

255274
2. **Create an Xorg config** for the dummy driver:
256275
```bash
@@ -386,7 +405,7 @@ pkill -f "gnome-session --session=ubuntu"
386405
sudo pkill -f "Xorg :99"
387406
```
388407
389-
`interfaces[]` supports up to 8 NICs (MTL's port limit); each `tx_sessions[]` entry picks its NIC via `nic_index` (see `config/tx_fullhd_multi_nic.json` for an 8-NIC/8-session example). Using more than 2 NICs with the default FFmpeg TX path requires the patched `mtl_st20p` muxer described above.
408+
`interfaces[]` supports up to 8 NICs (MTL's port limit); each `tx_sessions[]` entry picks its NIC via `nic_index` (see `config/tx_fullhd_multi_nic.json` for an 8-NIC/8-session example). Using more than 2 NICs with the default FFmpeg TX path requires the `p2_port`..`p7_port` AVOptions described above, which are present at the pinned MTL commit.
390409
391410
## Logging
392411
@@ -680,6 +699,19 @@ sudo pkill -9 -f dvledtx
680699
# Group should be 'vfio' with rw permissions
681700
```
682701
702+
6. **`pip install` fails with `externally-managed-environment`**
703+
- On newer systems (Ubuntu 24.04+, PEP 668) `pip` refuses to install packages system-wide, which breaks installing the Python build tools (`meson`, `ninja`, `pyelftools`) required by DPDK/MTL. Re-run the install with `--break-system-packages`:
704+
```bash
705+
pip install --break-system-packages meson ninja pyelftools
706+
```
707+
708+
7. **FFmpeg `./configure` fails with `nasm/yasm not found or too old`**
709+
- Building FFmpeg (and DPDK) requires the NASM assembler. If configuring FFmpeg errors out looking for `nasm`, install it:
710+
```bash
711+
sudo apt install -y nasm
712+
```
713+
- Then re-run FFmpeg's `./configure`.
714+
683715
## Contributing
684716
685717
Contributions are welcome. Please open an issue or submit a pull request on [GitHub](https://github.com/OpenVisualCloud/directview-led-software-toolkit).

Security.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Security Policy
22
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
33

4+
## Security Model
5+
6+
dvledtx is designed for deployment on a physically secured, network-isolated media segment. The
7+
transport (SMPTE ST 2110-20) and its PTP timing provide no authentication, encryption or
8+
integrity protection; security is delegated to MTL/ST 2110 and to the physical and Layer 2
9+
isolation of that segment.
10+
11+
**In scope:** the dvledtx transmitter application, its JSON configuration parsing, and its use
12+
of FFmpeg and the Media Transport Library.
13+
14+
**Out of scope:** the receivers (customer-designed, typically FPGA-based, and not delivered with
15+
this toolkit), the LED panels, and the physical and network controls of the installation site.
16+
17+
The trust boundary, the deployment assumptions this model depends on, and the residual risk if
18+
those assumptions are broken are documented in
19+
[Deployment Assumptions and Security Model](docs/assumptions.md).
20+
421
## Reporting a Vulnerability
522
Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).
623

0 commit comments

Comments
 (0)