prosyslab-classroom / cs348-information-security

62 stars 10 forks source link

[Question][Hw4] Would comment in JSON be accepted by the parser? #104

Closed Standchen closed 3 years ago

Standchen commented 3 years ago

Looking into json_parser.c, I found some comment-related code (line 651 - 709)

It seems like the code enables ability to parse comment in json (but such behavior is pretty far from JSON what I know). json_enable_comments is also set to 1. Thus it is reasonable to guess that the parser accepts some comments in given JSON string.

However, I cannot figure out how to have the parser to accept the comment. I've tried many inputs like {"key": "value" /* MY COMMENT */}, but none of them were accepted by the parser.

In short: Is it possible to reach comment-related statements?

KihongHeo commented 3 years ago

We do not provide the details of the behavior. That is the goal of your fuzzer: estimating the behavior.

SW bugs usually happen in unexpected situations, no? 🙃

Standchen commented 3 years ago

Acknowledged. I'll focus on the nature of fuzzer!