Skip to content

Commit

Permalink
staging: ft1000: fix kernel info leak to userland for statistics
Browse files Browse the repository at this point in the history
get_stat_data is not fully initialized before copy_to_user() call,
e.g. LedStat is not always set.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Oct 5, 2010
1 parent b7378b9 commit 86ee1e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 86ee1e4

Please sign in to comment.