Commit 8e75f7a7 authored by Vladis Dronov's avatar Vladis Dronov Committed by Bartlomiej Zolnierkiewicz

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/441Reported-by: default avatarsohu0106 <sohu0106@126.com>
Signed-off-by: default avatarVladis Dronov <vdronov@redhat.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent b9a58de5
...@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) ...@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
case ATYIO_CLKR: case ATYIO_CLKR:
if (M64_HAS(INTEGRATED)) { if (M64_HAS(INTEGRATED)) {
struct atyclk clk; struct atyclk clk = { 0 };
union aty_pll *pll = &par->pll; union aty_pll *pll = &par->pll;
u32 dsp_config = pll->ct.dsp_config; u32 dsp_config = pll->ct.dsp_config;
u32 dsp_on_off = pll->ct.dsp_on_off; u32 dsp_on_off = pll->ct.dsp_on_off;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment