Skip to contentSkip to conversation

statistics_write: ft1000: fix kernel info leak to userland

PATCH Superseded Vasiliy Kulikov 1 participant 1 message Sep 28, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 statistics_write: ft1000: fix kernel info leak to userland

get_stat_data is not fully initialized before copy_to_user() call, e.g. LedStat is not always set.

---
 drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c +1 -1
index 65087ce..467fd31 100644
@@ -623,7 +623,7 @@ static int 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);
Signature · 1 line
1.7.0.4