Skip to content

SWRDKV-5447: ocdm-widevine defect fix.#25

Merged
afranc083 merged 9 commits into
rdkcentral:developfrom
jianwang-brcm:feature/BCM-2076
Jul 17, 2026
Merged

SWRDKV-5447: ocdm-widevine defect fix.#25
afranc083 merged 9 commits into
rdkcentral:developfrom
jianwang-brcm:feature/BCM-2076

Conversation

@jianwang-brcm

Copy link
Copy Markdown
Contributor

What it does: clamps the IV memcpy length to sizeof(iv) (16) so an attacker-supplied sampleInfo->ivLength cannot overflow the stack buffer.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI review requested due to automatic review settings June 29, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the MediaKeySession decryption/notification paths in the Widevine OCDM integration, primarily addressing memory-safety risks from client-controlled inputs.

Changes:

  • Clamp the IV memcpy length to the IV buffer size to prevent stack overflow in MediaKeySession::Decrypt.
  • Add m_piCallback initialization and null-guards before invoking callback methods.
  • Add SVP in-band header size validation and a token-size guard to prevent out-of-bounds copies when handling secure buffers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp
Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp
Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp Outdated
Copilot AI review requested due to automatic review settings July 13, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp
Comment thread MediaSession.cpp Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread MediaSession.cpp Outdated
Comment thread MediaSession.cpp
Comment thread MediaSession.cpp
Copilot AI review requested due to automatic review settings July 15, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread MediaSession.cpp
Comment thread MediaSession.cpp
Copilot AI review requested due to automatic review settings July 16, 2026 15:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread MediaSession.cpp
Comment thread MediaSession.cpp
@afranc083
afranc083 merged commit 175ad64 into rdkcentral:develop Jul 17, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants