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

Firefox: Short read; Could not decrypt record or bad MAC #31

Open
rentallect opened this issue Nov 22, 2020 · 2 comments
Open

Firefox: Short read; Could not decrypt record or bad MAC #31

rentallect opened this issue Nov 22, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@rentallect
Copy link
Member

Seeing different behavior depending on which browser is used (with ziti-sdk-js 0.6.3+)

Although the tmdb web-app test-mule runs very solidly under Chrome (87.0.4280.67), it intermittently fails under Firefox (83.0) on a Macbook.

The problem manifests on the edge router as:

ERROR [foundation/channel2.(*channelImpl).rxer [ch{edge}->u{classic}->i{ORXE}] rx error (short read)

The edge router is attempting to read the 4-byte magic number for the edge-protocol message, but gets zero bytes instead. The error is unrecoverable on edge router side, so it closes the channel.

The client side then gets confused, and the attempt to decrypt incoming traffic/responses, manifests an error:

Could not decrypt record or bad MAC

There seems to be some kind of async/timing differences, or websocket data-chunking differences, concerning how things operate on these two browsers while running the exact same code.

@smilindave26
Copy link
Member

smilindave26 commented Nov 22, 2020 via email

@rentallect
Copy link
Member Author

@smilindave26 No, not in this scenario, because I'm running these tests against a locally-deployed Ziti build/network, that contains realease-next + my-forge-poc stuff.

fwiw, the failure behavior doesn't change if I swap the service from encryption ON or OFF. Always works with Chrome either way, tends to fail with FF either way.

Current evidence suggests that ziti-sdk-js executes slightly differently depending on the browser that is hosting it. i.e. Safari has a slightly different issue which I will open once I have more relevant info.

@rentallect rentallect added the bug Something isn't working label Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants