From 86ee1e49cf8bd07d4e849be8f056c6bc179686b8 Mon Sep 17 00:00:00 2001 From: Vasiliy Kulikov Date: Sun, 3 Oct 2010 21:22:48 +0400 Subject: [PATCH] staging: ft1000: fix kernel info leak to userland for statistics get_stat_data is not fully initialized before copy_to_user() call, e.g. LedStat is not always set. Signed-off-by: Vasiliy Kulikov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c index 46e72e4b91fd..3325e8765390 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c @@ -616,7 +616,7 @@ static long ft1000_ChIoctl (struct file *File, unsigned int Command, break; case IOCTL_GET_DSP_STAT_CMD: //DEBUG("FT1000:ft1000_ChIoctl: IOCTL_FT1000_GET_DSP_STAT called\n"); - + memset(&get_stat_data, 0, sizeof(get_stat_data)); memcpy(get_stat_data.DspVer, info->DspVer, DSPVERSZ); memcpy(get_stat_data.HwSerNum, info->HwSerNum, HWSERNUMSZ); memcpy(get_stat_data.Sku, info->Sku, SKUSZ); -- 2.30.2