Skip to content

Commit

Permalink
Remove stupid scoring and tidy up entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSomebody committed Apr 14, 2020
1 parent 6028abb commit 96083da
Show file tree
Hide file tree
Showing 14 changed files with 315 additions and 323 deletions.
50 changes: 36 additions & 14 deletions decompiler-tool-bugs/entry-001/entry.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,47 @@
# entry-001
Modifies MANIFEST.MF byte headers by setting jar archive byte offsets of 0x6
Modifies MANIFEST.MF byte headers by setting JAR archive byte offsets of 0x6
and 0x7 to 0x0 and 0x8 to 0x8.

## Bytecode-Viewer
Bytecode-Viewer crashes upon trying to load the jar entries.

#### Scoring
Consistency: 10
Practicality: 7
Total score: 0.85
Bytecode-Viewer crashes upon attempting to load the JAR entries. Crash log:
```
java.util.zip.ZipException: invalid entry size (expected 0 but got 443 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at the.bytecode.club.bytecodeviewer.util.JarUtils.getBytes(JarUtils.java:175)
at the.bytecode.club.bytecodeviewer.util.JarUtils.put(JarUtils.java:65)
at the.bytecode.club.bytecodeviewer.BytecodeViewer$6.run(BytecodeViewer.java:849)
java.util.zip.ZipException: invalid entry size (expected 0 but got 443 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:140)
at the.bytecode.club.bytecodeviewer.util.JarUtils.put(JarUtils.java:86)
at the.bytecode.club.bytecodeviewer.BytecodeViewer$6.run(BytecodeViewer.java:849)
```

#### Patch Date
2019-04-17

## Helios
Helios crashes upon trying to load the jar entries.

#### Scoring
Consistency: 10
Practicality: 7
Total score: 0.85
Helios crashes upon trying to load the JAR entries. Crash log:
```
java.util.zip.ZipException: invalid entry size (expected 0 but got 443 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2146)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2102)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2123)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2078)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:721)
at com.heliosdecompiler.helios.controller.files.OpenedFile.readQuick(OpenedFile.java:115)
at com.heliosdecompiler.helios.controller.files.OpenedFile.reset(OpenedFile.java:69)
at com.heliosdecompiler.helios.controller.files.OpenedFile.<init>(OpenedFile.java:53)
at com.heliosdecompiler.helios.controller.files.OpenedFileController.lambda$openFile$0(OpenedFileController.java:54)
at com.heliosdecompiler.helios.controller.backgroundtask.BackgroundTask.run(BackgroundTask.java:45)
at java.lang.Thread.run(Thread.java:748)
```

#### Patch Date
N/A
N/A
21 changes: 3 additions & 18 deletions decompiler-tool-bugs/entry-002/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,21 @@
Name of non-class resources ends in .class.

## JByteEdit
JByteEdit refuses to load the jar due to invalid classes.

#### Scoring
Consistency: 10
Practicality: 6
Total score: 0.80
JByteEdit refuses to load the JAR due to invalid classes.

#### Patch Date
N/A

## JByteMod-Beta
JByteMod-Beta skips loading and saving the resources due to invalid classes. This causes said
resources to be removed from the jar archive on a save.

#### Scoring
Consistency: 10
Practicality: 5
Total score: 0.75
resources to be removed from the JAR archive on a save.

#### Patch Date
N/A

## Bytecode-Viewer
Bytecode-Viewer skips loading and saving the resources due to invalid classes. This causes said
resources to be removed from the jar archive on a save.

#### Scoring
Consistency: 10
Practicality: 5
Total score: 0.75
resources to be removed from the JAR archive on a save.

#### Patch Date
2019-04-17
10 changes: 2 additions & 8 deletions decompiler-tool-bugs/entry-003/entry.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# entry-003
Sets the path of a class to META-INF/\u0000/ which is a method of hiding classes against file
archivers popularized by samczsun. According to samczsun, this also causes issues with Java 7,
so you were warned.
Prepends META-INF/\u0000/ to the start of a class name which is a method of hiding classes against file
archivers popularized by samczsun. However, this trick is incompatible with Java 7, and any Java version above 9.

## Non-Java Archivers
Non-Java archivers (7zip, WinRAR, Windows, etc.) are unable to display the classes.

#### Scoring
Consistency: 10
Practicality: 6
Total score: 0.80

#### Patch Date
N/A
42 changes: 29 additions & 13 deletions decompiler-tool-bugs/entry-004/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,44 @@ L92: pop2 ; Stack = [-893664644]
L93: ldc -893664644 ; Stack = [-893664644, -893664644]
L95: ixor ; Stack = [0]
```
In the PoC linked with the entry, this should decompile to
```java
public class Example {
public static void main(String[] var0) {
System.out.println(-893664644 ^ -893664644);
}
}
```

## FernFlower
FernFlower is unable to parse the stack correctly resulting in changed code and sometimes illegal
code.

#### Scoring
Consistency: 10
Practicality: 7
Decompiler Inaccuracy: 6
Total score: 0.77
code. Decompiled result of poc.jar:
```java
public class Example {
public static void main(String[] var0) {
int var10001 = -893664644;
System.out.println(-893664644 ^ 2030482428);
}
}
```

#### Patch Date
Unknown

## JD-GUI
JD-GUI is unable to parse the stack correctly resulting in changed and often illegal code.
JD-GUI is unable to parse the stack correctly resulting in changed and, in some cases, illegal code. Decompiled result of poc.jar:
```java
import java.io.PrintStream;

#### Scoring
Consistency: 10
Practicality: 8
Decompiler Inaccuracy: 8
Total score: 0.87
public class Example
{
public static void main(String[] paramArrayOfString)
{
-893664644;
System.out.println(0x7906B3FC ^ 0xCABBC27C);
}
}
```

#### Patch Date
N/A
24 changes: 0 additions & 24 deletions decompiler-tool-bugs/entry-005/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,23 @@ random signature-read errors by the JVM.
## JD-GUI
JD-GUI crashes on attempting to decompile the class.

#### Scoring
Consistency: 10
Practicality: 5
Decompiler Inaccuracy: 5
Total score: 0.67

#### Patch Date
2019-05-13

## Procyon
Procyon crashes on attempting to decompile the class.

#### Scoring
Consistency: 10
Practicality: 5
Decompiler Inaccuracy: 5
Total score: 0.67

#### Patch Date
N/A

## CFR
CFR &lt; 0.138 crashes on attempting to decompile the class.

#### Scoring
Consistency: 10
Practicality: 5
Decompiler Inaccuracy: 5
Total score: 0.67

#### Patch Date
2018-12-14

## javap
javap crashes on attempting to disassemble the class.

#### Scoring
Consistency: 10
Practicality: 5
Decompiler Inaccuracy: 5
Total score: 0.67

#### Patch Date
N/A
10 changes: 2 additions & 8 deletions decompiler-tool-bugs/entry-006/entry.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# entry-006
Presents a primitive integer as an Object to a bootstrap method parameter via an invokedynamic opcode.
Presents a primitive integer as an Object to a bootstrap method parameter via an invokedynamic opcode. Example of reproduction via OW2's ASM library.

```java
methodVisitor.visitInvokeDynamicInsn("example", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", bsm, 1);
```

## CFR
CFR fails on decompiling the methods and leaves a relevant error in the method body.

#### Scoring
Consistency: 10
Practicality: 5
Decompiler Inaccuracy: 5
Total score: 0.67
CFR fails on decompiling the methods with said invokedynamic present and leaves a relevant error in the method body.

#### Patch Date
2018-12-14
9 changes: 1 addition & 8 deletions decompiler-tool-bugs/entry-007/entry.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# entry-007
Wraps the handler type class name with `L` and `;` as found
[here](https://github.com/ItzSomebody/Radon/pull/60). This is verified to cause
Java 11 to refuse to load the class. Known to work all the way up to Java 8
(1.8.0_201).
Java 9+ to refuse to load the class. Known to work completely fine Java 8.

## Krakatau
Krakatau is unable to decompile the method due to it not being able to find the
handler class.

#### Scoring
Consistency: 10
Practicality: 3
Decompiler Inaccuracy: 5
Total score: 0.60

#### Patch Date
2019-6-11
37 changes: 24 additions & 13 deletions decompiler-tool-bugs/entry-008/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,35 @@ with the first block resulting in behavior change.

Issue link: https://github.com/leibnitz27/cfr/issues/4

#### Scoring
Consistency: 10
Practicality: 3
Decompiler Inaccuracy: 7
Total score: 0.67

#### Patch Date
2019-06-13

## JD-GUI
JD-GUI decompiles the method completely wrong. The result is a behavior change
and unreachable code.
JD-GUI decompiles the method completely wrong. The result is a behavior change and unreachable code. Decompiled result of poc.jar:
```java
import java.io.PrintStream;

#### Scoring
Consistency: 10
Practicality: 3
Decompiler Inaccuracy: 9
Total score: 0.73
public class Test
{
public static void main(String[] paramArrayOfString)
{
for (;;)
{
System.out.println("Hello #2");
return;
try
{
System.out.println("Hello #1");
null;
}
catch (FakeException localFakeException)
{
return;
}
}
}
}
```

#### Patch Date
N/A
Loading

0 comments on commit 96083da

Please sign in to comment.