Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine: "unknown_failure: tls: first record does not look like a TLS handshake" #2410

Open
gurshabad opened this issue Feb 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working correctly data quality methodology issues related to the testing methodology needs investigation This issue needs extra data and investigation ooni/probe-engine priority/low Nice to have testing user feedback requests that have been added to the backlog as a direct result of user feedback or testing

Comments

@gurshabad
Copy link

Describe the bug

While analysing measurements classified as 'failed', I found many instances of this error (specfically in Pakistan). In all such cases, this error was symptomatic of censorship. A middlebox is likely interrupting HTTPS connections in an improper way, which is unrecognised by OONI clients. For such measurements, the control was usually successful in making a connection with the web endpoint.

Expected behavior

This error should be intercepted and handled (and probably classified as 'anomaly').

System information

All the forty (40) instances I found of this error were on ooniprobe-android (3.6.0). Have classified it as such for the purposes of this bug, I am currently unsure if this exists on other platforms or not.

Additional context

3 examples: 1, 2, 3. 37 other examples in this Google Sheet (Please Ctrl-F for the error description).

@gurshabad gurshabad added bug Something isn't working correctly triage Should be triaged through the triage board labels Feb 14, 2023
@bassosimone bassosimone added testing priority/medium Normal priority issue user feedback requests that have been added to the backlog as a direct result of user feedback or testing methodology issues related to the testing methodology data quality needs investigation This issue needs extra data and investigation ooni/probe-engine and removed triage Should be triaged through the triage board labels Feb 21, 2023
@bassosimone
Copy link
Contributor

bassosimone commented Feb 21, 2023

I could reproduce this issue:

% ./miniooni -n web_connectivity -i https://www.example.com:80/
[...]

[      0.000876] <info> ooniprobe-engine/v3.18.0-alpha b69759ade1c88c263105e55503d9c687c11d709e dirty=false go1.19.6

[...]

[      1.146934] <info> DNS analysis result: consistent
[      1.370952] <info> TCP/TLS endpoints: 1/2 reachable
[      1.371045] <info> GET https://www.example.com:80/...
[      1.595625] <info> GET https://www.example.com:80/... unknown_failure: tls: first record does not look like a TLS handshake

[...]

% tail -n1 report.jsonl | jq '.test_keys|.tls_handshakes'

[
  {
    "network": "",
    "address": "93.184.216.34:80",
    "cipher_suite": "",
    "failure": "unknown_failure: tls: first record does not look like a TLS handshake",
    "negotiated_protocol": "",
    "no_tls_verify": false,
    "peer_certificates": null,
    "server_name": "www.example.com",
    "t": 0.987417,
    "tags": [
      "tcptls_experiment"
    ],
    "tls_version": ""
  }
]

What happened in the real measurement could be different. However, the above straw man test case indicates the direction in which to move to shed light on what was happening at the network level: we need to record the bytes of the first message we receive during the TLS handshake. We should also map this error to an OONI error.

To summarize, here's what we need to do:

  • map the specific error string to an OONI error;
  • record the bytes of the first message after the TLS handshake.

By mapping the error, we stop treating this kind of failure as an unknown failure. By exposing the bytes in the first message, we shed light on what actually happened.

@bassosimone bassosimone changed the title android: handle "unknown_failure: tls: first record does not look like a TLS handshake" engine: "unknown_failure: tls: first record does not look like a TLS handshake" Feb 21, 2023
@hellais hellais added this to Roadmap Jan 7, 2025
@hellais hellais added priority/low Nice to have and removed priority/medium Normal priority issue labels Jan 27, 2025
@hellais hellais moved this to Icebox in Roadmap Jan 27, 2025
@hellais hellais removed this from Roadmap Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly data quality methodology issues related to the testing methodology needs investigation This issue needs extra data and investigation ooni/probe-engine priority/low Nice to have testing user feedback requests that have been added to the backlog as a direct result of user feedback or testing
Projects
None yet
Development

No branches or pull requests

3 participants