googleprojectzero / googleprojectzero/fuzzilli

Extend ExplorationMutator to explore `super` accesses

Open
#387 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Swift
Stars
2.3k
Forks
367
Avg merge
23h 53m
Merged PRs (30d)
1

Description

The ExplorationMutator could be extended to also be able to explore super in e.g. class definitions. This would likely require a new ExploreSuper operation which then looks at the prototype chain of this in contexts where super is valid. The following code shows how runtime introspection could be performed for the super binding:

class B {
  a = 42;
  get c() {
    return this.b + 1;
  }
}

class C extends B {
  b = 43;
  get c() {
    return "foo"
  }
  m() {
    console.log(Object.getOwnPropertyNames(this.__proto__.__proto__));
    // The following two are identical.
    return Reflect.get(this.__proto__.__proto__, 'c', this);
    return super.c;
  }

}

let o = new C;
console.log(o.m());

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating ExplorationMutator and the existing exploration operations, then compare their handling of class contexts with the supplied JavaScript example. Define what an ExploreSuper operation must inspect in the prototype chain and when super is valid; done means the mutator explores those accesses without invalid contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, swift
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.