We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5200 - CVE-2020-14409 and CVE-2020-14410
Summary: CVE-2020-14409 and CVE-2020-14410
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.12
Hardware: x86_64 All
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-19 03:26 UTC by Carlos Andres Ramirez
Modified: 2020-06-19 17:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Andres Ramirez 2020-06-19 03:26:05 UTC
This has recently been FIXED, added here for reference for all parties.

On June 17th, two security issues were reported to the SDL team in regards of (1) a Buffer Overflow in video/SDL_blit_N.c and (2) an Integer Overflow leading to Heap Corruption in video/SDL_blit_copy.c. As a result of both of these issues, an attacker could crash/DOS/take control of the application via an especially crafted .BMP file.

A patch was quickly released by the team.

*DETAILS*
After analysis of the PoC, both of the issues were fixed by doing several changes in three different parts of video/SDL_surface.c, which prevents the bad input from reaching the exploitable functions.

Changed in SDL_surface.c
- Function SDL_CalculatePitch()
- Function SDL_CreateRGBSurfaceWithFormat()
- SDL_COMPILE_TIME_ASSERT()
Changeset: https://hg.libsdl.org/SDL/rev/3f9b4e92c1d9

For reference, these have been assigned CVE IDs CVE-2020-14409 for the Integer Overflow/Heap Corruption and CVE-2020-14410 for the Out-of-Bounds Read BoF.

----
Carlos Andres Ramirez Catano
Comment 1 Sam Lantinga 2020-06-19 17:35:53 UTC
Thanks for the report!

FYI, the change to SDL_COMPILE_TIME_ASSERT() was not necessary and was rolled back in a later commit.