Bug 198308 - Correct flaky WebAuthN test cases
Summary: Correct flaky WebAuthN test cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-28 15:58 PDT by Brent Fulgham
Modified: 2019-05-29 10:05 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2019-05-28 17:26 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2019-05-28 15:58:10 PDT
A series of flaky WebAuthN crashes were due to a mistake in the implementation of the MockHidConnection test object. This code is not used in production operation, and is not a security risk.

After reserving the appropriate size for the payload, and appending the Nonce to the payload, it was grown to the size of the kHidInitResponseSize constant. Unfortunately, this also changes the value the payload Vector returns when asked for its size.

Consequently, we always began writing the CtapChannelIdSize value aafter the end of the buffer we had just allocated.

I did not find any other instances of this coding issue elsewhere.
Comment 1 Brent Fulgham 2019-05-28 15:58:34 PDT
<rdar://problem/48677219>
Comment 2 Brent Fulgham 2019-05-28 17:26:48 PDT
Created attachment 370811 [details]
Patch
Comment 3 David Kilzer (:ddkilzer) 2019-05-28 21:10:45 PDT
Comment on attachment 370811 [details]
Patch

r=me assuming the test failures aren't caused by this change.
Comment 4 Brent Fulgham 2019-05-28 22:54:30 PDT
Boy it would be hard to imagine this change affecting that Download test. I’ll run locally under ASan and confirm the change doesn’t trigger that failure before landing.
Comment 5 Brent Fulgham 2019-05-29 09:37:50 PDT
(In reply to David Kilzer (:ddkilzer) from comment #3)
> Comment on attachment 370811 [details]
> Patch
> 
> r=me assuming the test failures aren't caused by this change.

Yes, that flaky timeout is well known (see Bug 198298).
Comment 6 WebKit Commit Bot 2019-05-29 10:05:08 PDT
Comment on attachment 370811 [details]
Patch

Clearing flags on attachment: 370811

Committed r245852: <https://trac.webkit.org/changeset/245852>
Comment 7 WebKit Commit Bot 2019-05-29 10:05:09 PDT
All reviewed patches have been landed.  Closing bug.