Skip to content

Commit 4d8457f

Browse files
jhovolddianders
authored andcommitted
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: 69c7717 ("drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error") Cc: [email protected] # 6.2 Cc: Douglas Anderson <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 77bc762 commit 4d8457f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_edid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,7 @@ u32 drm_edid_get_panel_id(struct i2c_adapter *adapter)
27972797
* the EDID then we'll just return 0.
27982798
*/
27992799

2800-
base_block = kmalloc(EDID_LENGTH, GFP_KERNEL);
2800+
base_block = kzalloc(EDID_LENGTH, GFP_KERNEL);
28012801
if (!base_block)
28022802
return 0;
28032803

0 commit comments

Comments
 (0)