A vulnerability in the Linux kernel's AMD display driver (drm/amd/display) related to the drm_edid_raw() function has been fixed. The function previously lacked proper sanity checks when retrieving EDID data, which could result in either a NULL pointer dereference causing a kernel Oops or memory corruption due to overly long EDID data. This issue was triggered by bad adapters providing malformed EDID information. The fix adds sanity checks to handle these cases safely and returns an error code when invalid input is detected.