WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
309534
CDMSessionAVContentKeySession::isAnyKeyUsable should check that content key is available
https://bugs.webkit.org/show_bug.cgi?id=309534
Summary
CDMSessionAVContentKeySession::isAnyKeyUsable should check that content key i...
Ruthvik Konda
Reported
2026-03-09 17:33:51 PDT
`CDMSessionAVContentKeySession::attachContentKeyToSample()` crashes with a debug ASSERT when `[contentKeyRequest() contentKey]` returns nil. The legacy CDM session's `isAnyKeyUsable()` returns true when key IDs from the `AVContentKeyRequest` match the sample's key IDs, but does not verify that `[request contentKey]` is non-nil. This allows samples to proceed through `canEnqueueSample()` and reach `attachContentKeyToSample()` before AVFoundation has finished deriving the content key (via `processContentKeyResponse:`). The modern code path (`CDMInstanceSessionFairPlayStreamingAVFObjC::attachContentKeyToSample`) already handles nil `contentKey` gracefully via an early return. Stack trace: 0 com.apple.WebCore: WTFCrashWithInfo 1 com.apple.WebCore: CDMSessionAVContentKeySession::attachContentKeyToSample 2 com.apple.WebCore: AudioVideoRendererAVFObjC::attachContentKeyToSampleIfNeeded 3 com.apple.WebCore: AudioVideoRendererAVFObjC::enqueueSample 4 com.apple.WebKit: RemoteAudioVideoRendererProxyManager::enqueueSample [...] <
rdar://171478431
>
Attachments
Add attachment
proposed patch, testcase, etc.
Ruthvik Konda
Comment 1
2026-03-09 17:50:20 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/60234
EWS
Comment 2
2026-03-10 22:09:58 PDT
Committed
309033@main
(ec2a9eedd035): <
https://commits.webkit.org/309033@main
> Reviewed commits have been landed. Closing PR #60234 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug