Skip to content

Commit 8e75f7a

Browse files
nefigtutbzolnier
authored andcommitted
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: torvalds/linux#441 Reported-by: sohu0106 <[email protected]> Signed-off-by: Vladis Dronov <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
1 parent b9a58de commit 8e75f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
18551855
#if defined(DEBUG) && defined(CONFIG_FB_ATY_CT)
18561856
case ATYIO_CLKR:
18571857
if (M64_HAS(INTEGRATED)) {
1858-
struct atyclk clk;
1858+
struct atyclk clk = { 0 };
18591859
union aty_pll *pll = &par->pll;
18601860
u32 dsp_config = pll->ct.dsp_config;
18611861
u32 dsp_on_off = pll->ct.dsp_on_off;

0 commit comments

Comments
 (0)