Skip to content

Commit c34cb7a

Browse files
nefigtutfreak07
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]> (cherry picked from commit b188b51c98c5ffecc59978f0098c6c28b4313220)
1 parent 869732a commit c34cb7a

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
@@ -1861,7 +1861,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
18611861
#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
18621862
case ATYIO_CLKR:
18631863
if (M64_HAS(INTEGRATED)) {
1864-
struct atyclk clk;
1864+
struct atyclk clk = { 0 };
18651865
union aty_pll *pll = &par->pll;
18661866
u32 dsp_config = pll->ct.dsp_config;
18671867
u32 dsp_on_off = pll->ct.dsp_on_off;

0 commit comments

Comments
 (0)