googleprojectzero / googleprojectzero/fuzzilli

fuzzying 2M+ consistent crash with this same instruction

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

Nobody has claimed this yet.

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

Description

Fuzzer Statistics

Fuzzer state: Fuzzing (with MultiEngine)
Uptime: 0d 7h 49m 23s
Total Samples: 200468
Interesting Samples Found: 14780
Last Interesting Sample: 0d 0h 0m 54s
Valid Samples Found: 100005
Corpus Size: 14778 (global average: 14756)
Correctness Rate: 49.89% (overall: 49.89%)
Timeout Rate: 7.57% (overall: 6.95%)
Crashes Found: 34
Timeouts Hit: 13936
Coverage: 27.74%
Avg. program size: 74.62
Avg. corpus program size: 32.78
Avg. program execution time: 131ms
Connected nodes: 9
Execs / Second: 65.30
Fuzzer Overhead: 11.01%
Minimization Overhead: 63.13%
Total Execs: 2564620

[ExplorationMutator] Frequencies of outcomes:
[ExplorationMutator] Success : 56.56%
[ExplorationMutator] Cannot instrument input : 0.00%
[ExplorationMutator] Instrumented program crashed : 0.00%
[ExplorationMutator] Instrumented program failed : 33.22%
[ExplorationMutator] Instrumented program timed out: 10.22%
[ExplorationMutator] No results received : 0.00%
[ExplorationMutator] Unexpected Error : 0.00%
[ExplorationMutator] Average number of inserted explore operations: 14.00
[ExplorationMutator] Frequencies of generated operations:
[ExplorationMutator] CONSTRUCT_METHOD : 9.81%
[ExplorationMutator] TEST_IS_NAN : 0.02%
[ExplorationMutator] SIGNED_RIGHT_SHIFT : 1.41%
[ExplorationMutator] COMPARE_LESS_THAN : 0.12%
[ExplorationMutator] CONSTRUCT : 5.64%
[ExplorationMutator] SUB : 2.02%
[ExplorationMutator] CALL_METHOD : 21.82%
[ExplorationMutator] COMPARE_STRICT_EQUAL : 0.32%
[ExplorationMutator] SYMBOL_REGISTRATION : 1.55%
[ExplorationMutator] LEFT_SHIFT : 0.53%
[ExplorationMutator] COMPARE_LESS_THAN_OR_EQUAL : 0.15%
[ExplorationMutator] INC : 1.40%
[ExplorationMutator] DIV : 0.77%
[ExplorationMutator] GET_PROPERTY : 9.18%
[ExplorationMutator] COMPARE_GREATER_THAN_OR_EQUAL : 0.14%
[ExplorationMutator] UNSIGNED_RIGHT_SHIFT : 1.58%
[ExplorationMutator] CALL_FUNCTION : 2.52%
[ExplorationMutator] LOGICAL_AND : 0.90%
[ExplorationMutator] BITWISE_OR : 0.65%
[ExplorationMutator] DEC : 2.17%
[ExplorationMutator] BITWISE_NOT : 0.54%
[ExplorationMutator] NEG : 1.10%
[ExplorationMutator] MOD : 0.58%
[ExplorationMutator] ADD : 1.54%
[ExplorationMutator] LOGICAL_NOT : 0.86%
[ExplorationMutator] COMPARE_STRICT_NOT_EQUAL : 0.52%
[ExplorationMutator] DELETE_PROPERTY : 0.00%
[ExplorationMutator] LOGICAL_OR : 0.78%
[ExplorationMutator] COMPARE_NOT_EQUAL : 0.30%
[ExplorationMutator] BITWISE_AND : 0.88%
[ExplorationMutator] MUL : 0.73%
[ExplorationMutator] NULL_COALESCE : 9.86%
[ExplorationMutator] TEST_IS_FINITE : 0.01%
[ExplorationMutator] COMPARE_EQUAL : 0.32%
[ExplorationMutator] COMPARE_GREATER_THAN : 0.30%
[ExplorationMutator] BITWISE_XOR : 0.72%
[ExplorationMutator] SET_PROPERTY : 18.25%
[95850103:Fuzzer] Code generator DisposableObjectLiteralBeginGenerator might be broken. Correctness rate is only 2.49%% after 201 generated samples
[95850103:Fuzzer] Code generator DisposableObjectLiteralComputedMethodBeg might be broken. Correctness rate is only 2.49%% after 201 generated samples
[95850103:Fuzzer] Code generator DisposableObjectLiteralComputedMethodEnd might be broken. Correctness rate is only 2.49%% after 201 generated samples
[95850103:Fuzzer] Code generator DisposableObjectLiteralEndGenerator might be broken. Correctness rate is only 2.49%% after 201 generated samples
[95850103:Fuzzer] Code generator DisposableClassDefinitionBeginGenerator might be broken. Correctness rate is only 1.12%% after 535 generated samples
[95850103:Fuzzer] Code generator DisposableClassInstanceComputedMethodBeg might be broken. Correctness rate is only 1.12%% after 535 generated samples
[95850103:Fuzzer] Code generator DisposableClassInstanceComputedMethodEnd might be broken. Correctness rate is only 1.12%% after 535 generated samples
[95850103:Fuzzer] Code generator DisposableClassDefinitionEndGenerator might be broken. Correctness rate is only 1.12%% after 535 generated samples
[95850103:Fuzzer] Code generator DisposableClassDefinitionBeginGenerator might be broken. Correctness rate is only 0.42%% after 476 generated samples
[95850103:Fuzzer] Code generator DisposableClassInstanceComputedMethodBeg might be broken. Correctness rate is only 0.42%% after 476 generated samples
[95850103:Fuzzer] Code generator DisposableClassInstanceComputedMethodEnd might be broken. Correctness rate is only 0.42%% after 476 generated samples
[95850103:Fuzzer] Code generator DisposableClassDefinitionEndGenerator might be broken. Correctness rate is only 0.42%% after 476 generated samples
[95850103:Fuzzer] Code generator PrivatePropertyRetrievalGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 0.26%% after 385 invocations
[95850103:Fuzzer] Code generator PrivatePropertyAssignmentGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 0.00%% after 374 invocations
[95850103:Fuzzer] Code generator PrivatePropertyUpdateGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 0.56%% after 179 invocations
[95850103:Fuzzer] Code generator PrivateMethodCallGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 7.69%% after 234 invocations
[95850103:Fuzzer] Code generator WasmReturnCallDirectGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 2.08%% after 288 invocations
[95850103:Fuzzer] Code generator WasmReturnCallIndirectGenerator might have too restrictive dynamic requirements. Its successful invocation rate is only 4.86%% after 144 invocations
Fuzzilli/JSTyper.swift:498: Fatal error: missing type definition link for type .wasmRef(null Index 0 Func[[.wasmSimd128] => [.wasmRef(null Index 0 Func), .wasmf64, .wasmRef(null Index 0 Struct), .wasmi64]]), desc UnownedWasmTypeDescription(description: Optional(0 Func[[.wasmSimd128] => [.wasmRef(null Index 0 Func), .wasmf64, .wasmRef(null Index 0 Struct), .wasmi64]]))

πŸ’£ Program crashed: Illegal instruction at 0x00007396120e2628

Platform: x86_64 Linux (Ubuntu 24.04.4 LTS)

Thread 11 crashed:

0 0x00007396120e2628 assertionFailure(:_:file:line🎏) + 264 in libswiftCore.so
1 ProgramBuilder.WasmFunction.generateRandomWasmVar(ofType:) + 1041 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Base/ProgramBuilder.swift:5103:72

5101β”‚ case .Index(_):
5102β”‚ if type.wasmReferenceType?.nullability ?? false {
5103β”‚ return self.wasmRefNull(typeDef: b.jsTyper.getWasmTypeDef(for: type))
β”‚ β–²
5104β”‚ }
5105β”‚ case .none:

2 ProgramBuilder.WasmFunction.findOrGenerateWasmVar(ofType:) in FuzzilliCli at Sources/Fuzzilli/Base/ProgramBuilder.swift:5114:60

5112β”‚
5113β”‚ public func findOrGenerateWasmVar(ofType type: ILType) -> Variable {
5114β”‚ if let result = b.randomVariable(ofType: type) ?? generateRandomWasmVar(ofType: type) {
β”‚ β–²
5115β”‚ return result
5116β”‚ }

3 closure #16 in variable initialization expression of WasmCodeGenerators + 582 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/CodeGen/WasmCodeGenerators.swift:241:39

239β”‚ for field in typeDesc.fields {
240β”‚ let fieldType = field.type.unpacked()
241β”‚ let fieldValue = function.findOrGenerateWasmVar(ofType: fieldType)
β”‚ β–²
242β”‚ initial_fields.append(fieldValue)
243β”‚ }

4 GeneratorAdapter1Arg.run(in:with:) in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/CodeGen/CodeGenerator.swift:36:9

34β”‚     func run(in b: ProgramBuilder, with inputs: [Variable]) {
35β”‚         assert(inputs.count == 1)
36β”‚         f(b, inputs[0])                                               
  β”‚         β–²
37β”‚     }
38β”‚ }

5 GeneratorStub.run(in:with:) + 107 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/CodeGen/CodeGenerator.swift:330:17

328β”‚ public func run(in b: ProgramBuilder, with inputs: [Variable]) -> Int {
329β”‚ let codeSizeBeforeGeneration = b.indexOfNextInstruction()
330β”‚ adapter.run(in: b, with: inputs)
β”‚ β–²
331β”‚ self.invoked()
332β”‚ let codeSizeAfterGeneration = b.indexOfNextInstruction()

6 ProgramBuilder.run(_:) + 1272 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Base/ProgramBuilder.swift:2571:50

2569β”‚ }
2570β”‚ }
2571β”‚ let numGeneratedInstructions = generator.run(in: self, with: inputs)
β”‚ β–²
2572β”‚ trace("Code generator finished")
2573β”‚

7 ProgramBuilder.complete(generator:withBudget:) + 4488 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Base/ProgramBuilder.swift:2376:47

2374β”‚
2375β”‚ // This runs the first part of the generator.
2376β”‚ numberOfGeneratedInstructions += self.run(generator.head)
β”‚ β–²
2377β”‚
2378β”‚ // If this generator says it provides a context, it must do so, it cannot fail because we would not be able to continue with the rest of the generator.

8 ProgramBuilder.build(n:by:) + 731 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Base/ProgramBuilder.swift:2143:25

2141β”‚
2142β”‚ // TODO: think about this and if we want to split this so that we get more CodeGenerators on the same level?
2143β”‚ let _ = complete(generator: generator!, withBudget: remainingBudget / splitFactor)
β”‚ β–²
2144β”‚
2145β”‚ case .splicing:

9 CodeGenMutator.mutate(::) + 444 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Mutators/CodeGenMutator.swift:56:15

54β”‚             b.adopt(instr)
55β”‚             assert(b.numberOfVisibleVariables >= minVisibleVariables)
56β”‚             b.build(n: defaultCodeGenerationAmount, by: .generating)  
  β”‚               β–²
57β”‚         }
58β”‚     }

10 closure #1 in BaseInstructionMutator.mutate(_:using:for:) + 662 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Mutators/BaseInstructionMutator.swift:48:21

46β”‚             for instr in program.code {
47β”‚                 if toMutate.contains(instr.index) {
48β”‚                     mutate(instr, b)                                  
  β”‚                     β–²
49β”‚                 } else {
50β”‚                     b.adopt(instr)

11 specialized ProgramBuilder.adopting(_:) in FuzzilliCli at Sources/Fuzzilli/Base/ProgramBuilder.swift:1560:9

1558β”‚ public func adopting(_ block: () -> Void) {
1559β”‚ beginAdoption()
1560β”‚ block()
β”‚ β–²
1561β”‚ endAdoption()
1562β”‚ }

12 BaseInstructionMutator.mutate(_:using:for:) + 664 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Mutators/BaseInstructionMutator.swift:45:11

43β”‚         }
44β”‚ 
45β”‚         b.adopting {                                                  
  β”‚           β–²
46β”‚             for instr in program.code {
47β”‚                 if toMutate.contains(instr.index) {

13 Mutator.mutate(_:for:) in FuzzilliCli at Sources/Fuzzilli/Mutators/Mutator.swift:26:23

24β”‚         let b = fuzzer.makeBuilder(forMutating: program)
25β”‚         b.traceHeader("Mutating \(program.id) with \(name)")
26β”‚         let program = mutate(program, using: b, for: fuzzer)          
  β”‚                       β–²
27β”‚         program?.contributors.insert(self)
28β”‚         return program

14 MutationEngine.fuzzOne(_:) + 911 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Engines/MutationEngine.swift:56:41

54β”‚             var mutatedProgram: Program? = nil
55β”‚             for _ in 0..<maxAttempts {
56β”‚                 if let result = mutator.mutate(parent, for: fuzzer) { 
  β”‚                                         β–²
57β”‚                     // Success!
58β”‚                     result.contributors.formUnion(parent.contributors)

15 MultiEngine.fuzzOne(_:) + 51 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Engines/MultiEngine.swift:50:22

48β”‚ 
49β”‚     public override func fuzzOne(_ group: DispatchGroup) {
50β”‚         activeEngine.fuzzOne(group)                                   
  β”‚                      β–²
51β”‚         currentIteration += 1
52β”‚         if currentIteration % iterationsPerEngine == 0 {

16 Fuzzer.fuzzOne() + 363 in FuzzilliCli at /home/turnerhackz1/Desktop/fuzzilli-main/Sources/Fuzzilli/Fuzzer.swift:1086:20

1084β”‚ case .fuzzing:
1085β”‚ iterations += 1
1086β”‚ engine.fuzzOne(fuzzGroup)
β”‚ β–²
1087β”‚ }
1088β”‚

17 0x00006339879e00b9 thunk for @escaping @callee_guaranteed () -> () + 24 in FuzzilliCli
...

Backtrace took 7.41s

Illegal instruction (core dumped)

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 with Sources/Fuzzilli/Base/ProgramBuilder.swift around line 5103 and trace the missing type definition lookup reported by JSTyper.swift:498. Read the WasmCodeGenerators.swift call at line 241 and reproduce the crash under the same Wasm fuzzing path; done means this input no longer triggers the fatal assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift, wasm
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.