Skip to content

Commit 77cb270

Browse files
nefigtutHuawei-Dev
authored andcommitted
video: fbdev: aty: do not leak uninitialized padding in clk to userspace
commit 8e75f7a7a00461ef6d91797a60b606367f6e344d upstream. '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: torvalds/linux#441 Reported-by: sohu0106 <[email protected]> Signed-off-by: Vladis Dronov <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent afca582 commit 77cb270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: drivers/video/fbdev/aty/atyfb_base.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
18521852
#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
18531853
case ATYIO_CLKR:
18541854
if (M64_HAS(INTEGRATED)) {
1855-
struct atyclk clk;
1855+
struct atyclk clk = { 0 };
18561856
union aty_pll *pll = &par->pll;
18571857
u32 dsp_config = pll->ct.dsp_config;
18581858
u32 dsp_on_off = pll->ct.dsp_on_off;

0 commit comments

Comments
 (0)