Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 97990a2481e5152757431ac3175afd85a7284283
https://github.com/WebKit/WebKit/commit/97990a2481e5152757431ac3175afd85a7284283
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientOutputs.cpp
M Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp
Log Message:
-----------
AuthenticationExtensionsClientOutputs::fromCBOR() compares a nested-map
iterator against the outer map's end()
https://bugs.webkit.org/show_bug.cgi?id=317240
rdar://179858461
Reviewed by Pascoe and Darin Adler.
In the credProps branch the iterator returned by find() on the nested credProps
map was compared
against decodedMap.end() (the outer map). Comparing iterators from different
containers is undefined
behavior, and since the nested map's end() is essentially never equal to the
outer
map's end(), a
credProps map lacking an "rk" key passed the guard and dereferenced a
past-the-end iterator. Use a
separate iterator compared against the credProps map's own end(), as the
largeBlob branch already
does.
Test: Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp
* Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientOutputs.cpp:
(WebCore::AuthenticationExtensionsClientOutputs::fromCBOR):
* Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:
(TestWebKitAPI::encodeExtensionOutputs):
(TestWebKitAPI::encodeCredPropsExtensionOutputs):
(TestWebKitAPI::TEST(CTAPResponseTest, TestExtensionOutputsCredPropsWithoutRk)):
Canonical link:
https://flagged.apple.com:443/proxy?t2=DE3P2L4Nb8&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE1NTEwQG1haW4=&emid=7af60f5d-e7cf-4af6-ad53-50a9c5c23257&c=11
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications