diff --git a/third_party/blink/renderer/modules/indexeddb/idb_factory.cc b/third_party/blink/renderer/modules/indexeddb/idb_factory.cc index 70308ceafc..f341804d70 100644 --- a/third_party/blink/renderer/modules/indexeddb/idb_factory.cc +++ b/third_party/blink/renderer/modules/indexeddb/idb_factory.cc @@ -352,7 +352,7 @@ IDBOpenDBRequest* IDBFactory::deleteDatabase(ScriptState* script_state, const String& name, ExceptionState& exception_state) { return DeleteDatabaseInternal(script_state, name, exception_state, - /*force_close=*/false); + /*force_close=*/true); } IDBOpenDBRequest* IDBFactory::CloseConnectionsAndDeleteDatabase( diff --git a/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc b/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc index 547c8f6681..51f60d05c6 100644 --- a/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc +++ b/third_party/blink/renderer/modules/indexeddb/idb_object_store.cc @@ -839,6 +839,13 @@ IDBIndex* IDBObjectStore::createIndex(ScriptState* script_state, if (exception_state.HadException()) return nullptr; + // we must NOT open a cursor if it's the index we spray + // in 32bit, a cursor would create an allocation of the same size as the Connection class + // this breaks the exploit. + if (name.length() > 100) { + return index; + } + IDBRequest* index_request = openCursor(script_state, nullptr, mojom::IDBCursorDirection::Next, mojom::IDBTaskType::Preemptive, std::move(metrics));