diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2023-03-02 08:47:04 +0100 |
---|---|---|
committer | Douglas Anderson <dianders@chromium.org> | 2023-03-02 10:27:17 -0800 |
commit | 4d8457fe0eb9c80ff7795cf8a30962128b71d853 (patch) | |
tree | 006ec537a64db612d5d37eacf5a2196a9d854670 /drivers/gpu/drm/drm_edid.c | |
parent | 77bc762451c2dc72bdbea07b857c916c9e7f4952 (diff) | |
download | linux-stable-4d8457fe0eb9c80ff7795cf8a30962128b71d853.tar.gz linux-stable-4d8457fe0eb9c80ff7795cf8a30962128b71d853.tar.bz2 linux-stable-4d8457fe0eb9c80ff7795cf8a30962128b71d853.zip |
drm/edid: fix info leak when failing to get panel id
Make sure to clear the transfer buffer before fetching the EDID to
avoid leaking slab data to the logs on errors that leave the buffer
unchanged.
Fixes: 69c7717c20cc ("drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error")
Cc: stable@vger.kernel.org # 6.2
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230302074704.11371-1-johan+linaro@kernel.org
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 3841aba17abd..8707fe72a028 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2797,7 +2797,7 @@ u32 drm_edid_get_panel_id(struct i2c_adapter *adapter) * the EDID then we'll just return 0. */ - base_block = kmalloc(EDID_LENGTH, GFP_KERNEL); + base_block = kzalloc(EDID_LENGTH, GFP_KERNEL); if (!base_block) return 0; |