4 security holes in 2.4.4-ac8
Quoted 7 lines · David S. Miller
Quoted 2 lines · Dawson Engler
Is there any way to automatically find these? E.g., is any routine with "asmlinkage" callable from user space?
This is only universally done in generic and x86 specific code, other ports tend to forget asmlinkage simply because most ports don't need it.
Even i386 doesn't need it because the stack frame happens to have the right order of the arguments at the right position. Just you can get into weird bugs when any function modifies their argument because it'll be still modified after syscall restart but only depending if the compiler used a temporary register or not.
-Andi
Quoted 10 lines · Andi Kleen
Quoted 7 lines · David S. Miller
Quoted 2 lines · Dawson Engler
Is there any way to automatically find these? E.g., is any routine with "asmlinkage" callable from user space?
This is only universally done in generic and x86 specific code, other ports tend to forget asmlinkage simply because most ports don't need it.
Quoted 5 lines
Even i386 doesn't need it because the stack frame happens to have the right order of the arguments at the right position. Just you can get into weird bugs when any function modifies their argument because it'll be still modified after syscall restart but only depending if the compiler used a temporary register or not.
For IA64 you *must* use asmlinkage because the first 8 parameters are passed in registers. gcc will happily modify the register values which will mess up syscall restart, unless you use asmlinkage to force gcc to take copies of parameters and modify the copies.