Skip to content

Commit 27323cb

Browse files
nefigtutgregkh
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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 150cd84 commit 27323cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 1 addition & 1 deletion
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)