Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in ISOProtectionSystemSpecificHeaderBox::parse with large keyID counts #15027

Conversation

aestes
Copy link
Contributor

@aestes aestes commented Jun 15, 2023

3b3afcc

Crash in ISOProtectionSystemSpecificHeaderBox::parse with large keyID counts
https://bugs.webkit.org/show_bug.cgi?id=258174
rdar://110412566

Reviewed by Jean-Yves Avenard.

KeyID is 16 bytes, so it's possible for a `pssh` box to specify a `keyIDCount` large enough that the
following keyIDs array cannot be contained by a Vector. To account for this, try to reserve capacity
for `keyIDCount` in m_keyIDs before resizing and return `false` if the reservation fails.

* Source/WebCore/platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
(WebCore::ISOProtectionSystemSpecificHeaderBox::parse):

Canonical link: https://commits.webkit.org/265256@main

22ea988

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
  πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@aestes aestes self-assigned this Jun 15, 2023
@aestes aestes added the Media Bugs related to the HTML 5 Media elements. label Jun 15, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 16, 2023
@aestes aestes removed the merging-blocked Applied to prevent a change from being merged label Jun 16, 2023
@aestes aestes force-pushed the eng/Crash-in-ISOProtectionSystemSpecificHeaderBoxparse-with-large-keyID-counts branch from ca22e64 to 9d08693 Compare June 16, 2023 20:17
@aestes aestes force-pushed the eng/Crash-in-ISOProtectionSystemSpecificHeaderBoxparse-with-large-keyID-counts branch from 9d08693 to 22ea988 Compare June 16, 2023 20:19
@aestes aestes added the merge-queue Applied to send a pull request to merge-queue label Jun 16, 2023
… counts

https://bugs.webkit.org/show_bug.cgi?id=258174
rdar://110412566

Reviewed by Jean-Yves Avenard.

KeyID is 16 bytes, so it's possible for a `pssh` box to specify a `keyIDCount` large enough that the
following keyIDs array cannot be contained by a Vector. To account for this, try to reserve capacity
for `keyIDCount` in m_keyIDs before resizing and return `false` if the reservation fails.

* Source/WebCore/platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
(WebCore::ISOProtectionSystemSpecificHeaderBox::parse):

Canonical link: https://commits.webkit.org/265256@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Crash-in-ISOProtectionSystemSpecificHeaderBoxparse-with-large-keyID-counts branch from 22ea988 to 3b3afcc Compare June 16, 2023 21:01
@webkit-commit-queue
Copy link
Collaborator

Committed 265256@main (3b3afcc): https://commits.webkit.org/265256@main

Reviewed commits have been landed. Closing PR #15027 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 3b3afcc into WebKit:main Jun 16, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
5 participants