diff options
author | Kangjie Lu <kjlu@umn.edu> | 2019-10-17 23:29:53 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-10-22 10:59:36 +0200 |
commit | 57a25a5f754ce27da2cfa6f413cfd366f878db76 (patch) | |
tree | 3616282ea4c466e9af894970c21e1bded0ec333c /drivers/gpu/drm/gma500 | |
parent | 2b6f5883edcc47ef6146832112a0125810d28f78 (diff) | |
download | linux-57a25a5f754ce27da2cfa6f413cfd366f878db76.tar.gz linux-57a25a5f754ce27da2cfa6f413cfd366f878db76.tar.bz2 linux-57a25a5f754ce27da2cfa6f413cfd366f878db76.zip |
gma/gma500: fix a memory disclosure bug due to uninitialized bytes
`best_clock` is an object that may be sent out. Object `clock`
contains uninitialized bytes that are copied to `best_clock`,
which leads to memory disclosure and information leak.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191018042953.31099-1-kjlu@umn.edu
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_display.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c index f56852a503e8..8b784947ed3b 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_display.c +++ b/drivers/gpu/drm/gma500/cdv_intel_display.c @@ -405,6 +405,8 @@ static bool cdv_intel_find_dp_pll(const struct gma_limit_t *limit, struct gma_crtc *gma_crtc = to_gma_crtc(crtc); struct gma_clock_t clock; + memset(&clock, 0, sizeof(clock)); + switch (refclk) { case 27000: if (target < 200000) { |