endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
829 stars 72 forks source link

Lockdown failing in Chrome Canary 122.0.6249 #1971

Closed FrederikBolding closed 9 months ago

FrederikBolding commented 9 months ago

Describe the bug

When running lockdown() in the latest version of Chrome Canary, an unexpected property is found and thus an error is thrown:

sentry-install.js:1 TypeError#1: Accessor not expected at intrinsics.%IteratorPrototype%.constructor
 at isAllowedProperty (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4159:13)
  at visitProperties (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4206:26)
  at isAllowedPropertyValue (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4093:7)
  at isAllowedProperty (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4156:14)
  at visitProperties (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4206:26)
  at whitelistIntrinsics (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:4249:3)
  at repairIntrinsics (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:9937:3)
  at globalThis.lockdown (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:10026:28)
  at createKernel (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:11333:5)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:12428:18
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/runtime-lavamoat.js:12534:3

Stack is from the MetaMask extension, but this is reproducible outside of the MetaMask extension as well (e.g. here).

Steps to reproduce

  1. Go to https://execution.metamask.io/3.4.2/index.html
  2. Notice the above error in the browser console

Expected behavior

Lockdown to fully complete without throwing.

Platform environment

Chrome Canary 122.0.6249 Mac OS 13.6.2 SES 0.18.8

Additional context

Screenshots

image