From 06c03cac9487555478c7d80065ebf7818bf6fd06 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Mon, 7 Nov 2005 21:12:07 +0000 Subject: [ARM] 3117/1: nwfpe kernel memory info leak Patch from Lennert Buytenhek The routine that nwfpe uses for converting floats/doubles to extended precision fails to zero two bytes of kernel stack. This is not immediately obvious, as the floatx80 structure has 16 bits of implicit padding (by design.) These two bytes are copied to userspace when an stfe is emulated, causing a possible info leak. Make the padding explicit and zero it out in the relevant places. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King --- arch/arm/nwfpe/softfloat-specialize | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/nwfpe/softfloat-specialize') diff --git a/arch/arm/nwfpe/softfloat-specialize b/arch/arm/nwfpe/softfloat-specialize index acf40914476..d4a4c8e0663 100644 --- a/arch/arm/nwfpe/softfloat-specialize +++ b/arch/arm/nwfpe/softfloat-specialize @@ -332,6 +332,7 @@ static floatx80 commonNaNToFloatx80( commonNaNT a ) z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; + z.__padding = 0; return z; } -- cgit v1.2.3