Summary: | Baloo file extractor crashes a dozen times for Mobipocket files | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdegraphics-mobipocket | Reporter: | Christian (Fuchs) <kde> |
Component: | general | Assignee: | Unassigned bugs <unassigned-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | CC: | stefan.bruens, tagwerk19 |
Priority: | NOR | Keywords: | drkonqi |
Version First Reported In: | 2.1.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Christian (Fuchs)
2024-05-10 15:02:45 UTC
(In reply to Christian (Fuchs) from comment #0) > #5 0x00007fc211b44aac in standardDeclarationForNode(QTextHtmlParserNode > const&) () from /lib64/libQt6Gui.so.6 > #6 0x00007fc211b45bc2 in QTextHtmlParser::declarationsForNode(int) const () > from /lib64/libQt6Gui.so.6 > #7 0x00007fc211b46830 in QTextHtmlParser::parseTag() () from > /lib64/libQt6Gui.so.6 > #8 0x00007fc211b46df0 in QTextHtmlParser::parse() () from > /lib64/libQt6Gui.so.6 > #9 0x00007fc211aeb2ea in > QTextHtmlImporter::QTextHtmlImporter(QTextDocument*, QString const&, > QTextHtmlImporter::ImportMode, QTextDocument const*) () from > /lib64/libQt6Gui.so.6 > #10 0x00007fc211ad3f16 in QTextDocument::setHtml(QString const&) () from > /lib64/libQt6Gui.so.6 > #11 0x00007fc20e11fb7f in > KFileMetaData::MobiExtractor::extract(KFileMetaData::ExtractionResult*) () > from /usr/lib64/qt6/plugins/kf6/kfilemetadata/kfilemetadata_mobiextractor.so It's looking like a "messed up" ebook (a .mobi with embedded HTML?). There's also Bug 475730 and, perhaps more usefully, Bug 475975... (In reply to tagwerk19 from comment #1) > (In reply to Christian (Fuchs) from comment #0) > > #5 0x00007fc211b44aac in standardDeclarationForNode(QTextHtmlParserNode > > const&) () from /lib64/libQt6Gui.so.6 > > #6 0x00007fc211b45bc2 in QTextHtmlParser::declarationsForNode(int) const () > > from /lib64/libQt6Gui.so.6 > > #7 0x00007fc211b46830 in QTextHtmlParser::parseTag() () from > > /lib64/libQt6Gui.so.6 > > #8 0x00007fc211b46df0 in QTextHtmlParser::parse() () from > > /lib64/libQt6Gui.so.6 > > #9 0x00007fc211aeb2ea in > > QTextHtmlImporter::QTextHtmlImporter(QTextDocument*, QString const&, > > QTextHtmlImporter::ImportMode, QTextDocument const*) () from > > /lib64/libQt6Gui.so.6 > > #10 0x00007fc211ad3f16 in QTextDocument::setHtml(QString const&) () from > > /lib64/libQt6Gui.so.6 > > #11 0x00007fc20e11fb7f in > > KFileMetaData::MobiExtractor::extract(KFileMetaData::ExtractionResult*) () > > from /usr/lib64/qt6/plugins/kf6/kfilemetadata/kfilemetadata_mobiextractor.so > It's looking like a "messed up" ebook (a .mobi with embedded HTML?). There's > also Bug 475730 and, perhaps more usefully, Bug 475975... Thanks for the links, I'll go subscribe to the latter. In an ideal world though, a malformed file should not lead to baloo crashing, very visibly to the end user as it spams the systray with a dozen of Dr. Konqi instances. If there is malformed content produced by a third party library, there should be the equivalent of a catch around that so it could fail on that file gracefully (and potentially mark it to not re-index) (In reply to Christian (Fuchs) from comment #2) > ... fail on that file gracefully (and potentially mark it to not re-index) ... It could be that's caught now, the fix is quite recent though https://invent.kde.org/frameworks/baloo/-/merge_requests/174 Hats off to Stefan... Also some history in Bug 421317 and Bug 477115 Will set as a duplicate of Bug 475975 *** This bug has been marked as a duplicate of bug 475975 *** A possibly relevant merge request was started @ https://invent.kde.org/graphics/kdegraphics-mobipocket/-/merge_requests/20 Git commit a5b423d58133c46791cc53e6d67425366f94b266 by Stefan Brüns. Committed on 28/02/2025 at 23:07. Pushed by bruns into branch 'master'. Fix broken padding in BitReader The overload taking a char* appends the \0 terminated string, i.e. QByteArray::append("\x0...") is essentially a noop. This causes out-of-bounds accesses, either causing asserts or reading invalid data. See https://doc.qt.io/qt-6/qbytearray.html#append-3 SENTRY: OKULAR-AD SENTRY: BALOO-33 SENTRY: BALOO-43Y M +1 -1 lib/decompressor.cpp https://invent.kde.org/graphics/kdegraphics-mobipocket/-/commit/a5b423d58133c46791cc53e6d67425366f94b266 Git commit 866a069538a268d264cf002aa9570f97a84045da by Stefan Brüns. Committed on 28/02/2025 at 23:07. Pushed by bruns into branch 'master'. Fix possible out-of-bounds access in BitReader The read function access data up to data[(len + 31)/8], thus len should reflect the size (count of bits) of the original data, without the extra padding null characters. SENTRY: OKULAR-AD SENTRY: BALOO-33 SENTRY: BALOO-43Y M +1 -3 lib/decompressor.cpp https://invent.kde.org/graphics/kdegraphics-mobipocket/-/commit/866a069538a268d264cf002aa9570f97a84045da Git commit ce72f8b3edf53e3df3e5c8f6d59fd3cad9d50d11 by Carl Schwan, on behalf of Stefan Brüns. Committed on 23/03/2025 at 21:29. Pushed by carlschwan into branch 'release/25.04'. Fix broken padding in BitReader The overload taking a char* appends the \0 terminated string, i.e. QByteArray::append("\x0...") is essentially a noop. This causes out-of-bounds accesses, either causing asserts or reading invalid data. See https://doc.qt.io/qt-6/qbytearray.html#append-3 SENTRY: OKULAR-AD SENTRY: BALOO-33 SENTRY: BALOO-43Y (cherry picked from commit a5b423d58133c46791cc53e6d67425366f94b266) M +1 -1 lib/decompressor.cpp https://invent.kde.org/graphics/kdegraphics-mobipocket/-/commit/ce72f8b3edf53e3df3e5c8f6d59fd3cad9d50d11 Git commit 1eebd7a60571791f5d3447f18749660656c93798 by Carl Schwan, on behalf of Stefan Brüns. Committed on 23/03/2025 at 21:29. Pushed by carlschwan into branch 'release/25.04'. Fix possible out-of-bounds access in BitReader The read function access data up to data[(len + 31)/8], thus len should reflect the size (count of bits) of the original data, without the extra padding null characters. SENTRY: OKULAR-AD SENTRY: BALOO-33 SENTRY: BALOO-43Y (cherry picked from commit 866a069538a268d264cf002aa9570f97a84045da) M +1 -3 lib/decompressor.cpp https://invent.kde.org/graphics/kdegraphics-mobipocket/-/commit/1eebd7a60571791f5d3447f18749660656c93798 |