Ubuntu 20.04 LTS
c58a3a4aae4c423bd0477a981ad1c517a30579e3 (qt/qtbase/dev) a7d1c48ca3162a805708d059da87ca3d742863f1 (qt/qtbase/dev) 448e45b1f4cf9e4883c547d68312c469c79a9cd5 (qt/qtbase/6.2)
- Build the libfuzzer test for QDateTime::fromString, e.g.:
~/dev/clang-10.0.0/qt-dev_10.13-base_svg-devbld-no-openssl/qtbase/bin/qt-cmake -S ~/dev/src/qtbase/tests/libfuzzer/corelib/time/qdatetime/fromstring/ -GNinja && cmake --build . --parallel
- Run the resulting binary, passing in the attached file:
It takes too long to finish. Times I see are:
developer build, debug, no sanitizers 9901 ms static, release, UBSAN 10293 ms static, release, ASAN 68568 ms
The slow formats seem to be Qt::TextDate and Qt::RFC2822Date.
I admit, the file is a tad larger than usual, but why would fromString() even try to handle all of this data?
With Qt 6.2.0 and this input, fromString() finishes quickly, e.g. in 35ms with ASAN.
Google's oss-fuzz found this as issue 38077. They will publish the details on December 2nd.
- relates to
QTBUG-77948 Rewrite QDateTimeParser