)]}'
{
  "commit": "43bc20bd85b27e37cdbfd97b564f2bfe95b01b4b",
  "tree": "e2b055f8714d68f17ba79cfa701c450297442f4e",
  "parents": [
    "bf4d8fefc1e2e8e48eb51f96b365e72169cacce3"
  ],
  "author": {
    "name": "Juan Pablo Lopez Yacubian",
    "email": "jplopezy@gmail.com",
    "time": "Wed Oct 21 15:26:10 2026"
  },
  "committer": {
    "name": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Oct 21 22:20:02 2026"
  },
  "message": "Add a fuzzer for STUN response handling\n\nThe three existing STUN/TURN fuzzers are stateless: stun_parser_fuzzer\nreads a standalone StunMessage and validates it against an empty\npassword, stun_validator_fuzzer calls the static fingerprint and\nintegrity validators on raw bytes, and turn_unwrap_fuzzer calls\nUnwrapTurnPacket. None of them constructs a StunRequestManager, so\nnone of them reaches response handling at all:\n\n  RequestMap::iterator iter \u003d requests_.find(msg-\u003etransaction_id());\n  if (iter \u003d\u003d requests_.end())\n    return false;\n\nis the third line of CheckResponse, and a fuzzer that never sent a\nrequest always returns there. No target in test/fuzzers/BUILD.gn\ndepends on p2p, so everything downstream of that lookup is currently\nunfuzzed: the integrity decision that depends on the request\u0027s\nAuthenticationRequired state, the comprehension-required attribute\ncheck, the success/error branch split, and the OnResponse /\nOnErrorResponse dispatch.\n\nThis target sends credentialed ALLOCATE requests first, then builds\nresponses for them.\n\nThe response is built with the StunMessage builder instead of being\nhanded over as mutated bytes. Three filters sit in front of the state\nmachine: the transaction id has to match a pending request, the\nmessage type has to equal GetStunSuccessResponseType or\nGetStunErrorResponseType for that request, and on the success branch\nIntegrityOk() has to hold, which needs a valid HMAC-SHA1 over the\nmessage. The last one is not just unlikely to be guessed, it cannot\nbe, so a mutating target can never execute OnResponse. Building the\nmessage spends the input on the parts that carry attacker data -- which\nattributes are present, their lengths and contents, the error code,\nwhether integrity is valid, and the order in which responses arrive\nrelative to each other and to simulated time. Malformed wire input is\nleft to stun_parser_fuzzer rather than duplicated here.\n\nThe request is a TurnMessage rather than a StunMessage. CheckResponse\nparses the response with iter-\u003esecond-\u003emsg_-\u003eCreateNew(), so the\nrequest\u0027s class is what decides which attribute types count as\ncomprehended. With a plain StunMessage every TURN attribute (LIFETIME,\nDATA, XOR-RELAYED-ADDRESS) is unknown, and since they all sit in the\ncomprehension-required range the response is discarded before the\nbranch split is reached.\n\nThe callbacks act on the manager. The base class ones are empty, so a\ntarget that sends a plain StunRequest reaches the dispatch and then\nexecutes nothing, and CheckResponse states that a callback may modify\nthe StunRequestManager any way it sees fit. Each action mirrors a real\none: sending another request, as OnAuthChallenge and OnTryAlternate\nboth do from inside OnErrorResponse; clearing the manager, as TurnPort\ndoes when an allocation fails; and deferring that clear with PostTask,\nas the ALLOCATION_MISMATCH path does. Re-entrancy is depth-capped,\nsince production bounds its retries and an uncapped target would only\nfind its own recursion.\n\nSimulated time advances between deliveries in steps large enough to\nreach all eight retransmissions and the timeout.\n\nCoverage over the seed corpus, four workers for seven minutes:\nCheckResponse(StunMessage*) 36 of 80 edges, OnResponse 188 hits,\nOnErrorResponse 220, OnTimeout 83, RevalidateMessageIntegrity 169,\nGetErrorCodeValue 111. No crashes so far.\n\nThe seed corpus holds one file per branch, each named for the branch it\nreaches. The byte-level STUN dictionary is deliberately not used here:\nthe input is a command stream, so STUN byte patterns are noise in it.\n\nBug: None\nChange-Id: I166a130385591ceaf888f8485b39ed8380bfea93\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/510380\nReviewed-by: Tomas Gunnarsson \u003ctommi@webrtc.org\u003e\nSLSA-Policy-Verified: SLSA Policy Verification Service \u003cdevtools-gerritcodereview-exitgate@google.com\u003e\nCommit-Queue: Danil Chapovalov \u003cdanilchap@webrtc.org\u003e\nReviewed-by: Danil Chapovalov \u003cdanilchap@webrtc.org\u003e\nCr-Commit-Position: refs/heads/main@{#49009}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2cd623f0b1fc801ee6ae44c215cbabdc0210ea37",
      "old_mode": 33188,
      "old_path": "AUTHORS",
      "new_id": "9941d226e4dac789255e94175ff79369cf1548dd",
      "new_mode": 33188,
      "new_path": "AUTHORS"
    },
    {
      "type": "modify",
      "old_id": "a90fb214c95944d818953c13541659ad20a744d4",
      "old_mode": 33188,
      "old_path": "test/fuzzers/BUILD.gn",
      "new_id": "58dbfef396e2d81417278624a26d0eea75e0dc83",
      "new_mode": 33188,
      "new_path": "test/fuzzers/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1d6f6b8aaa421a1f14fddb04a0d58a85188d614f",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/error_300_try_alternate"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "667b59e38b20fec9879e4ef3b20b96a64c17d588",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/error_300_try_alternate_ipv6"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6d0ef480389fd907981c88058fc6cfda9b0395bb",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/error_401_resends_from_callback"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5f174751bc3f92f8af1fd26a1f38aa78707bb19b",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/error_437_deferred_teardown"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ab4f25679a5ca5583f27f1ee5ca75c9d0e3d800e",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/error_438_clears_manager_from_callback"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ef5a6a6fa2b5fd33fdc5242fc68b82d59ce2aaa3",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/four_pending_out_of_order"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "52fb4a23e69f815aa580151150068970f30c14c0",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/many_attributes"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e049ab835722d9976ddd3e3d614885c9ca12f705",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/non_comprehended_attribute_discards"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e7adbedd6c023e43ed76d071c01f744e4a09ff5e",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/prevalidated_other_password_revalidates"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e35b8b76624e4eb95eb63c34efaad99ac9b13704",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/prevalidated_same_password"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d84e56ba3b668a174ca9d7df7da93115e8fad7f6",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/success_bad_integrity"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "36447ebb0fdf772872d9be7ec8f757e9422fada0",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/success_no_integrity"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1ae4f445009434c085a2ac423f2836dd71f4de79",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/success_valid_integrity"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "185847c1c17f8bcf964f5f96aef1c1edc902a573",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/timeout_after_retransmits"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5646fd0d67af9ec5a4b0084dd6ebee28b0f2f517",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/unauthenticated_error_400_rejected"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3e12331b3df310d06c52ef996b91eed4155aa679",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/unauthenticated_success_discarded"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5768c7ffd0ef412388d78c46aed49de18711873a",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/unmatched_transaction_id"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4cdb3d15e9e710feac01cdc2882d496ef7ffcc93",
      "new_mode": 33188,
      "new_path": "test/fuzzers/corpora/stun-response-corpus/wrong_response_type"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3411a2e6841b39084fcdb7f9885590876c7508aa",
      "new_mode": 33188,
      "new_path": "test/fuzzers/stun_request_response_fuzzer.cc"
    }
  ]
}
