Heap OOB read in parse_ad_cdp: cc_count not bounded by packet length
メンテナーはふだん 1 日以内に返信
@Nikhil-jaiswal007 がすでに取り組んでいます。
2026年10月25日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
src/lib_ccx/ccx_gxf.c の parse_ad_cdp(558 行目付近)から始め、len、cdp_length、cc_count が残りのパケットバイト数をどのように表すかを追ってください。コピーする前に、申告された字幕データが収まることを確認し、次に ASan でビルドして、提供された 16 バイトの PoC を GXF パーサーに入力してください。入力が範囲外読み取りを起こすことなく安全に拒否されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
CCExtractor version: master HEAD
Bug
parse_ad_cdp in src/lib_ccx/ccx_gxf.c (line 558) reads cc_count from the CDP payload byte (5-bit field, max 31) and copies cc_count * 3 bytes starting at offset 9 without checking that those bytes fit within len.
cc_count = *cdp++ & 0x1f; // line 558, attacker-controlled, up to 31
for (int i = 0; i < cc_count * 3; i++) // line 560
{
data->buffer[data->len + i] = cdp[i]; // reads past cdp allocation
}
The header validation at line 494 only checks len < 11. A 16-byte packet passes that check but with cc_count = 23 the loop reads 69 bytes starting at offset 9, going 60 bytes past the end of the buffer.
The cdp_length check at line 512 (cdp_length != len) validates that the declared length matches the buffer, but cc_count is never validated against cdp_length.
Impact
Heap out-of-bounds read. The OOB bytes are copied into data->buffer, so heap contents can leak into subtitle output.
Reached via: ccextractor untrusted.gxf -- a GXF ancillary-data packet with DID 0x61 / SDID 0x01 routes through parse_ad_pyld to parse_ad_cdp (line 656).
PoC
16-byte input (base64):
lmkQQEAAAXJ3OHt9dAABAA==
Hex: 96 69 10 40 40 00 01 72 77 38 7b 7d 74 00 01 00
Build with ASan, feed through the GXF parser. ASan reports heap-buffer-overflow READ at cdp[i].
Found with AI-assisted fuzzing.
Suggested fix
Check that the caption data section fits in the remaining packet before reading:
cc_count = *cdp++ & 0x1f;
if (cc_count * 3 > (len - (cdp - (cdp_start))))
{
log("cc_count %d exceeds remaining CDP length\n", cc_count);
return CCX_EINVAL;
}
Where cdp_start is the original cdp pointer saved at entry.
- 主要言語
- C
- スター
- 908
- フォーク
- 595
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CCExtractor/ccextractor のほかの issue
-
[BUG] Heap buffer overflow in parse_PMT with C0/C1 section length対応中かも @kun-codes が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CCExtractor/ccextractor#2419 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Filename sequence expansion (`+`) panics on numeric values exceeding `i32::MAX`対応中かも @muntasir-396 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CCExtractor/ccextractor#2402 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] SIGSEGV in tlt_read_rcwt(): rcwt_loop re-checks parsebuf[6..7] after it was overwritten with caption data (608-mode RCWT)対応中かも @VishnuSrivatsava が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
CCExtractor/ccextractor#2429 ·
メンテナーはふだん 1 日以内に返信
-
[PROPOSAL] Port the MythTV packet reader (myth.c) to Rust対応中かも @kaihere14 が 4 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
CCExtractor/ccextractor#2421 ·
メンテナーはふだん 1 日以内に返信
-
CCExtractor: stack out-of-bounds write and quadratic out-of-bounds read in the DVB subtitle descriptor parser (parse_dvb_description)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
CCExtractor/ccextractor#2417 ·
メンテナーはふだん 1 日以内に返信
CCExtractor/ccextractor の issue をすべて見る
似ている issue
-
enhancement ui
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
ChupathingyCE/chupathingyce#485 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
JustAResearcher/gpu-unlock-ada#98 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
FujiNetWIFI/fujinet-firmware#2216 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信