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

MFA Fuzzing and Json.Unmarshal Panic fix #30854

Merged
merged 1 commit into from Aug 22, 2023
Merged

Conversation

jentfoo
Copy link
Contributor

@jentfoo jentfoo commented Aug 22, 2023

This expands the coverage of fuzzing in lib/web/fuzz_test.go and includes adding seeds. From this work a new panic was discovered where a pointer is allocated then a pointer to the pointer is passed into json.Unmarshal. It is then possible for this original pointer to remain a nil reference.

This pattern looks unexpected, so all cases of double pointers being passed into json.Unmarshal were changed to the more standard empty struct pointer style to avoid potential nil reference panics.

Originally opened in this PR: https://github.com/gravitational/teleport-private/pull/891 but severity was deemed low enough to fix directly in OSS

Backporting will be done through release PR's already open:

This expands the coverage of fuzzing in `lib/web/fuzz_test.go` and includes adding seeds.
From this work a new panic was discovered where a pointer is allocated then a pointer to the pointer is passed into json.Unmarshal.  It is then possible for this original pointer to remain a `nil` reference.

This pattern looks unexpected, so all cases of double pointers being passed into json.Unmarshal were changed to the more standard empty struct pointer style to avoid potential nil reference panics.
@jentfoo jentfoo added this pull request to the merge queue Aug 22, 2023
Merged via the queue into master with commit 259767f Aug 22, 2023
29 checks passed
@jentfoo jentfoo deleted the jent/json_unmarshal_panic_fix branch August 22, 2023 16:51
This was referenced Aug 22, 2023
@camscale camscale mentioned this pull request Aug 23, 2023
@fheinecke fheinecke mentioned this pull request Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants