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

Add "Checker MUST handle broken utf-8 gracefuly" Tenet #6

Open
domenukk opened this issue Apr 27, 2021 · 7 comments
Open

Add "Checker MUST handle broken utf-8 gracefuly" Tenet #6

domenukk opened this issue Apr 27, 2021 · 7 comments

Comments

@domenukk
Copy link
Member

domenukk commented Apr 27, 2021

Our checkers must not crash if teams insert random broken utf-8 characters into other team's publicly readable databases.
This would lead to an unfair and unpatchable disadvantage to these teams.
We should add this to our Tenets and probably add checks for it.
For service authors, they should either handle bytes encoded, or handle each decode and decide if they should continue on errors, there.

@Trolldemorted
Copy link
Member

Should we generalize it to "MUST gracefully handle all valid output of the service" or something similar?

If my service only accepts uftf8-input the checker should report mumble if it receives gibberish, and this is not utf8-specific but should also be applied to corrupted protobuf messages or whatever.

@domenukk
Copy link
Member Author

domenukk commented Apr 27, 2021

True, it should handle all input, however I would explicitly note broken utf-8. For example, broken protobuf would probably (rightfully) result in a mumble service (broken response), while broken unicode can be the result of a fully-functioning service, and should not mumble.

/edit: Checkerfuzzer ETA When

@Trolldemorted
Copy link
Member

For example, broken protobuf would probably (rightfully) result in a mumble service (broken response)

It depends, if the checker parses protobuf supplied by users then it can rightfully be malformed, under the assumption that the service does not enforce protobuf validity.

I agree that uft8 is the most common candidate, what about generalizing it and using utf8 as an example?

@domenukk
Copy link
Member Author

domenukk commented Apr 27, 2021

How about
A Checker MUST gracefully handle all valid output of the service. For example, be careful when decoding utf-8 from user-supplied fields, as they could contain illegal characters.

@domenukk
Copy link
Member Author

This has been addressed, I think?

@ldruschk
Copy link
Member

This has been addressed, I think?

Where? It's still missing from the tenets I think

@Trolldemorted
Copy link
Member

What do you think of when decoding utf-8 from user-supplied byte array fields?

If a service is expected to return a valid string the checker should say mumble after all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants