Commit dae512ed authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Linus Torvalds

drivers/char/hpet.c: fix information leak to userland

Structure info is copied to userland with some padding fields unitialized.
It leads to leaking of stack memory.

[ remove now-unneeded zeroing of info->hi_ireqfreq]
Signed-off-by: default avatarVasiliy Kulikov <>
Cc: Clemens Ladisch <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent aaaddfe0
......@@ -596,11 +596,10 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg,
memset(info, 0, sizeof(*info));
if (devp->hd_ireqfreq)
info->hi_ireqfreq =
hpet_time_div(hpetp, devp->hd_ireqfreq);
info->hi_ireqfreq = 0;
info->hi_flags =
readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
info->hi_hpet = hpetp->hp_which;
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