|
ArgumentsMaskedByVar
special arguments array maskable
Attack-Vector function arguments array masked by var arguments on OperaSee http://my.opera.com/hallvors/blog/?tag=javascript&startidx=24&nodaylimit=1. EffectRuntime checks that rely on arguments for arity checking or for forcing recursion can be defeated by a local variable definition. These checks will work on Firefox and IE, but will fail on Opera. BackgroundThe function body has an implied reference to arguments that allows access to function arguments, and the function itself. From Ecmascript 262 10.1.8, When control enters an execution context for function code, an arguments object is created and initialised as follows: ...
AssumptionsUntrusted code is allowed to declare a var with name arguments and runtime security checks use arguments to check parameters, or to force recursion to callee. VersionsArguments masking is only a known issue on Opera, and arguments on IE 6 is not consistent with the spec. Specifically, on IE 6, arguments.callee is not available. Example(function (a, b, c) {
var arguments = [1, 1, 1];
alert('arguments[0] === ' + arguments[0] + ', a=' + a);
arguments[0] = 2;
alert('arguments[0] === ' + arguments[0] + ', a=' + a);
})(0, 0, 0);
| |
last I checked, arguments.callee was indeed available on IE6. not sure if this is because of an update to jscript.dll or what.