Skip to contentSkip to conversation

char: mwave: fix information leak to userland

PATCH In review Vasiliy Kulikov 1 participant 1 message Oct 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/8 char: mwave: fix information leak to userland

Structure rAbilities is copied to userland with uart_enable, mwave_os_name and bios_task_name array end elements and some padding fields unitialized. It leads to leaking of stack memory.

---
Compile tested.

 drivers/char/mwave/mwavedd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/mwave/mwavedd.c +1 -0
index 1d82d58..73b6880 100644
@@ -165,6 +165,7 @@ static long mwave_ioctl(struct file *file, unsigned int iocmd,
 				"mwavedd::mwave_ioctl,"
 				" IOCTL_MW_DSP_ABILITIES calling"
 				" tp3780I_QueryAbilities\n");
+			memset(&rAbilities, 0, sizeof(MW_ABILITIES));
 			mutex_lock(&mwave_mutex);
 			retval = tp3780I_QueryAbilities(&pDrvData->rBDData,
 					&rAbilities);
Signature · 1 line
1.7.0.4