Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.3, 6.7.0
-
None
-
Operating System: Windows 11
Compiler: MSVC x64 Visual Studio 2022
Python Version: 3.9
Build System: Ninja 1.12.1
-
-
Windows
Description
In QtWebEngine 6.7.0, when building the engine, a crash occurs due to an access violation in the TrieWriter::WriteDispatchTables function. This issue arises if an entry with an empty hostname is included. The crash happens when attempting to access the first character of the empty string in the following code:
uint8_t candidate = (*start)->reversed_name.at(0);
This results in a STATUS_STACK_BUFFER_OVERRUN error, which crashes the application. The problem can be mitigated by skipping any empty entries before trying to access their characters.
Steps to Reproduce:
- Build QtWebEngine 6.7.0 or a project that includes the TrieWriter component.
- Ensure that the set of entries passed to the WriteEntries function contains at least one entry with an empty hostname.
- Trigger the WriteEntries function, which calls WriteDispatchTables.
- Observe the crash or access violation when attempting to process the empty entry.
Proposed Fix:
To resolve this issue, add a check in the WriteEntries function to skip empty entries before passing them to WriteDispatchTables:
for (auto* const entry : entries) { if (entry->name().empty()) { LOG(INFO) << "Skipping empty hostname entry"; continue; } // Continue with the rest of the logic... }
This fix will prevent the function from attempting to access an empty string in WriteDispatchTables, avoiding the crash. Additional Information: The bug is present in QtWebEngine 6.7.0 during the build process. The crash occurs when an empty hostname entry is passed to WriteEntries, causing an access violation in WriteDispatchTables. This issue was identified by attempting to access the first character of an empty string in WriteDispatchTables.
for more information see:
Qt6.5.3 Build QtWebEngine for Windows x64. Error: transport_security_state_generator.exe failed with exit code 3221226505