Skip to content

Validate zero padding size on unmarshal#357

Merged
JoTurk merged 1 commit intopion:masterfrom
asnyatkov:fix/validate-zero-padding-unmarshal
Mar 26, 2026
Merged

Validate zero padding size on unmarshal#357
JoTurk merged 1 commit intopion:masterfrom
asnyatkov:fix/validate-zero-padding-unmarshal

Conversation

@asnyatkov
Copy link
Copy Markdown
Contributor

RFC 3550 requires the padding byte to be non-zero when the padding bit is set. Marshal already validates this (errInvalidRTPPadding), but unmarshal does not, allowing malformed packets through.

This is related to CVE-2025-49140 in pion/interceptor which addressed improper RTP padding handling.

Description

Reference issue

Fixes #...

RFC 3550 requires the padding byte to be non-zero when the padding bit
is set. Marshal already validates this (errInvalidRTPPadding), but
unmarshal does not, allowing malformed packets through.

This is related to CVE-2025-49140 in pion/interceptor which addressed
improper RTP padding handling.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.60%. Comparing base (e119a01) to head (9df900b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   82.59%   82.60%   +0.01%     
==========================================
  Files          28       28              
  Lines        3430     3432       +2     
==========================================
+ Hits         2833     2835       +2     
  Misses        427      427              
  Partials      170      170              
Flag Coverage Δ
go 82.60% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoTurk
Copy link
Copy Markdown
Member

JoTurk commented Mar 26, 2026

thank you.

@JoTurk JoTurk merged commit 4444ac6 into pion:master Mar 26, 2026
17 of 18 checks passed
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.

2 participants