diff options
author | Vladis Dronov <vdronov@redhat.com> | 2017-09-04 10:00:50 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-09-04 10:00:50 -0400 |
commit | 8e75f7a7a00461ef6d91797a60b606367f6e344d (patch) | |
tree | 004a1d393f4c0b7a771540e54f566c522782f93d | |
parent | b9a58de545858ac9ee67745cdea6d94cc322938e (diff) |
video: fbdev: aty: do not leak uninitialized padding in clk to userspace
'clk' is copied to a userland with padding byte(s) after 'vclk_post_div'
field unitialized, leaking data from the stack. Fix this ensuring all of
'clk' is initialized to zero.
References: https://github.com/torvalds/linux/pull/441
Reported-by: sohu0106 <sohu0106@126.com>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-rw-r--r-- | drivers/video/fbdev/aty/atyfb_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index f49efb2fb75f..3ec72f19114b 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c | |||
@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) | |||
1855 | #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) | 1855 | #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) |
1856 | case ATYIO_CLKR: | 1856 | case ATYIO_CLKR: |
1857 | if (M64_HAS(INTEGRATED)) { | 1857 | if (M64_HAS(INTEGRATED)) { |
1858 | struct atyclk clk; | 1858 | struct atyclk clk = { 0 }; |
1859 | union aty_pll *pll = &par->pll; | 1859 | union aty_pll *pll = &par->pll; |
1860 | u32 dsp_config = pll->ct.dsp_config; | 1860 | u32 dsp_config = pll->ct.dsp_config; |
1861 | u32 dsp_on_off = pll->ct.dsp_on_off; | 1861 | u32 dsp_on_off = pll->ct.dsp_on_off; |