-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
REGRESSION (277924@main): nullptr deref crash calling XSLTProcessor.transformToFragment() before parsing XML #28147
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
ddkilzer:eng/REGRESSION-277924main-nullptr-deref-crash-calling-XSLTProcessor-transformToFragment-before-parsing-XML
May 6, 2024
Merged
REGRESSION (277924@main): nullptr deref crash calling XSLTProcessor.transformToFragment() before parsing XML #28147
webkit-commit-queue
merged 1 commit into
WebKit:main
from
ddkilzer:eng/REGRESSION-277924main-nullptr-deref-crash-calling-XSLTProcessor-transformToFragment-before-parsing-XML
May 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
EWS run on previous version of this PR (hash e9a39ea) |
e9a39ea
to
e357c91
Compare
EWS run on previous version of this PR (hash e357c91) |
achristensen07
approved these changes
May 6, 2024
e357c91
to
37eccf4
Compare
EWS run on current version of this PR (hash 37eccf4) |
β¦ransformToFragment() before parsing XML <https://bugs.webkit.org/show_bug.cgi?id=273735> <rdar://127496002> Reviewed by Alex Christensen. If docLoaderFunc() in XSLTProcessorLibxslt.cpp was called before an XML document was parsed, the WebCore::defaultEntityLoader global would not be initialized, which could result in a nullptr dereference crash. The fix is to call initializeXMLParser() in XMLDocumentParserScope() constructors since there are cases where XMLDocumentParserScope is used but XMLParserContext (the only place where initializeXMLParser() was called previously) is not. Test: fast/xsl/xslt-transform-to-fragment-no-xml-parsing-crash.html * LayoutTests/fast/xsl/xslt-transform-to-fragment-no-xml-parsing-crash-expected.txt: Add. * LayoutTests/fast/xsl/xslt-transform-to-fragment-no-xml-parsing-crash.html: Add. - Test is marked "runSingly=true" since parsing any XML content before running the test avoids the crash. * LayoutTests/platform/glib/fast/xsl/xslt-transform-to-fragment-no-xml-parsing-crash-expected.txt: Add. - Platform-specific results for GTK and WPE ports. * Source/WebCore/xml/parser/XMLDocumentParser.h: (WebCore::initializeXMLParser): Add declaration. * Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::externalEntityLoader): - Add RELEASE_ASSERT() for the cause of the original crash. (WebCore::initializeXMLParser): - Remove static keyword so this can be called from XMLDocumentParserScope() constructors. * Source/WebCore/xml/parser/XMLDocumentParserScope.cpp: (WebCore::XMLDocumentParserScope::XMLDocumentParserScope): - Call initializeXMLParser() from constructors before setting m_oldEntityLoader. Canonical link: https://commits.webkit.org/278419@main
37eccf4
to
cbbffda
Compare
Committed 278419@main (cbbffda): https://commits.webkit.org/278419@main Reviewed commits have been landed. Closing PR #28147 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
XML
For bugs in XML support other than XML DOM, including XSLT, XMLHTTPRequest, XML Parsing, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cbbffda
37eccf4
π§ͺ wpe-wk2π§ͺ ios-wk2π§ͺ ios-wk2-wptπ§ͺ gtk-wk2