--- 2.4.0-test10/arch/i386/kernel/i387.c.~1~ Thu Nov 2 23:07:22 2000 +++ 2.4.0-test10/arch/i386/kernel/i387.c Fri Nov 3 22:05:27 2000 @@ -440,9 +440,14 @@ int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf ) { if ( HAVE_FXSR ) { - __copy_from_user( &tsk->thread.i387.fxsave, (void *)buf, - sizeof(struct user_fxsr_struct) ); - return 0; + int error; + + error = __copy_from_user(&tsk->thread.i387.fxsave, (void *)buf, + sizeof(struct user_fxsr_struct)); + /* bit 6 and 31-16 must be zero for security reasons */ + tsk->thread.i387.fxsave.mxcsr &= 0xffbf; + + return error ? -EFAULT : 0; } else { return -EIO; }