Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to throw a Type Error #93

Open
sunlili opened this issue Aug 13, 2022 · 0 comments
Open

Fail to throw a Type Error #93

sunlili opened this issue Aug 13, 2022 · 0 comments

Comments

@sunlili
Copy link

sunlili commented Aug 13, 2022

version: jsish 3.5.0
os: ubuntu 20.04

poc1:

var V0 = (Object . setPrototypeOf ( Object . prototype , Array . prototype ));
var V1 = ( ( Number . NaN != new Object ( ) ) !== true ) ;

poc2:

const V5 = ( Object . setPrototypeOf ( Object . prototype , Array . prototype ) ) ;
let V6 = ( new RegExp ( 'new value' ) . source ) ;

output:
segment fault caused by OOM

My fuzzer finds those crashes, which caused by the same bug. Object.setPrototypeOf(Object.prototype, Array.prototype) makes the prototype chain loop. Object.prototype should be a immutable prototype exotic object. So, jsish should throw a TypeError when js code sets the prototype of the builtin Object.

ISec Lab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant