Bug 198308

Summary: Correct flaky WebAuthN test cases
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Severity: Normal CC: bfulgham, commit-queue, ddkilzer, jiewen_tan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

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
Comment 2 Brent Fulgham 2019-05-28 17:26:48 PDT
Created attachment 370811 [details]
Comment 3 David Kilzer (:ddkilzer) 2019-05-28 21:10:45 PDT
Comment on attachment 370811 [details]

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]

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.