Hostile 99% java Download

Jdk17Trigger.java

Java Base64 malformed-input overrun proofChecks malformed Base64 for sentinel overwrite
SHA-256ec5b9cce8e7614d9f0ed23faea3563add2a1e79e8942912a11fadd93cefb0041

Evidence

Builds repeated Base64 with invalid padding lines 1–48
1import java.nio.charset.StandardCharsets;
2import java.util.Arrays;
3import java.util.Base64;
4
5/** Bounded standalone trigger: every write stays inside a real 4096-byte array. */
6public final class Jdk17Trigger {
7 private static volatile int sink;
8
9 public static void main(String[] args) {
10 Base64.Decoder decoder = Base64.getDecoder();
11 byte[] valid = "A".repeat(128).getBytes(StandardCharsets.US_ASCII);
12 byte[] malformed = ("A".repeat(128) + "=").getBytes(StandardCharsets.US_ASCII);
13 byte[] target = new byte[4096];
14
15 for (int i = 0; i < 200_000; i++) {
16 sink += decoder.decode(valid, target);
17 }
18
19 Arrays.fill(target, (byte) 0x5a);
20 boolean rejected = false;
21 try {
22 decoder.decode(malformed, target);
23 } catch (IllegalArgumentException expected) {
24 rejected = true;
⋯4 lines
29 int last = -1;
30 for (int i = 50; i < target.length; i++) {
31 if (target[i] != (byte) 0x5a) {
32 changed++;
33 if (first < 0) first = i;
⋯15 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.