projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57a25a5
)
drm/gma500: fix memory disclosures due to uninitialized bytes
author
Kangjie Lu
<kjlu@umn.edu>
Fri, 18 Oct 2019 04:41:50 +0000
(23:41 -0500)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Tue, 22 Oct 2019 08:59:36 +0000
(10:59 +0200)
"clock" may be copied to "best_clock". Initializing best_clock
is not sufficient. The fix initializes clock as well to avoid
memory disclosures and informaiton leaks.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
https://patchwork.freedesktop.org/patch/msgid/20191018044150.1899-1-kjlu@umn.edu
drivers/gpu/drm/gma500/oaktrail_crtc.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/gma500/oaktrail_crtc.c
b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index 167c10767dd426a6a45505a36733bb69601e8808..900e5499249d5b852103e3e148761301d2649a7b 100644
(file)
--- a/
drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/
drivers/gpu/drm/gma500/oaktrail_crtc.c
@@
-129,6
+129,7
@@
static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,
s32 freq_error, min_error = 100000;
memset(best_clock, 0, sizeof(*best_clock));
+ memset(&clock, 0, sizeof(clock));
for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
for (clock.n = limit->n.min; clock.n <= limit->n.max;
@@
-185,6
+186,7
@@
static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
int err = target;
memset(best_clock, 0, sizeof(*best_clock));
+ memset(&clock, 0, sizeof(clock));
for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max;