Skip to content

Commit 6b92a71

Browse files
mstarzinger@chromium.orgbnoordhuis
authored andcommitted
v8: back-port fix for CVE-2013-2882
Quoting the CVE: Google V8, as used in Google Chrome before 28.0.1500.95, allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors that leverage "type confusion." Likely has zero impact on node.js because it only runs local, trusted code but let's apply it anyway. This is a back-port of upstream commit r15665. Original commit log: Use internal array as API function cache. R=yangguo@chromium.org BUG=chromium:260106 TEST=cctest/test-api/Regress260106 Review URL: https://codereview.chromium.org/19159003 Fixes #5973.
1 parent 231092d commit 6b92a71

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

deps/v8/src/apinatives.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function CreateDate(time) {
3737
}
3838

3939

40-
var kApiFunctionCache = {};
40+
var kApiFunctionCache = new InternalArray();
4141
var functionCache = kApiFunctionCache;
4242

4343

deps/v8/test/cctest/test-api.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17707,6 +17707,17 @@ THREADED_TEST(Regress157124) {
1770717707
}
1770817708

1770917709

17710+
THREADED_TEST(Regress260106) {
17711+
LocalContext context;
17712+
v8::HandleScope scope(context->GetIsolate());
17713+
Local<FunctionTemplate> templ = FunctionTemplate::New(DummyCallHandler);
17714+
CompileRun("for (var i = 0; i < 128; i++) Object.prototype[i] = 0;");
17715+
Local<Function> function = templ->GetFunction();
17716+
CHECK(!function.IsEmpty());
17717+
CHECK(function->IsFunction());
17718+
}
17719+
17720+
1771017721
#ifndef WIN32
1771117722
class ThreadInterruptTest {
1771217723
public:

0 commit comments

Comments
 (0)