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

Does CVE-2024-1580 affect libavif with dav1d decoder? #2122

Closed
friedfalafell0w opened this issue Apr 18, 2024 · 1 comment
Closed

Does CVE-2024-1580 affect libavif with dav1d decoder? #2122

friedfalafell0w opened this issue Apr 18, 2024 · 1 comment

Comments

@friedfalafell0w
Copy link

I have a project that uses libavif with dav1d decoder, which has a recent bug (CVE-2024-1580). I'm not sure if libavif is affected though, and I would appreciate some help to confirm this in order to decide whether I need to update immediately.

The vulnerable code path in dav1d is only reached when c->n_fc > 1 (https://code.videolan.org/videolan/dav1d/-/blob/2b475307dc11be9a1c3cc4358102c76a7f386a51/src/decode.c#L2845), where c is the dav1d context.

The way libavif calls into dav1d, the max frame delay is hardcoded to 1 in the dav1d settings (https://github.com/AOMediaCodec/libavif/blob/main/src/codec_dav1d.c#L63), which intern means that c->n_fc in dav1d is always 1 (https://code.videolan.org/videolan/dav1d/-/blob/master/src/lib.c?ref_type=heads#L122).

From my understand, this should mean that libavif isn't affected. Am I missing something?

@jzern
Copy link
Collaborator

jzern commented Apr 18, 2024

I believe this required large frame sizes (https://crbug.com/325284120 for those with access). libavif sets a default of 16384x16384 like Chrome does, so wouldn't be vulnerable unless this size was increased.

And yes, it looks like having a frame delay > 1 was necessary.

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

No branches or pull requests

3 participants