Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94070

Memory corruption in sqlite plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.12, 6.1.2, 6.2.0 Alpha
    • 5.12, 6.0, 6.1, 5.15
    • SQL Support
    • None
    • All
    • 0f38259cb3aee5cce5a2af99af3f69712c9f1123 (qt/qtbase/dev) 47a1e10d63d9c11fe600c703240031b2d02eb3a6 (qt/qtbase/6.1) 07b690bcdb6b4607bb691939a27481b88d554033 (qt/qtbase/5.12) 39ba8025e02b47a8fa450c67d14f52e651955175 (qt/tqtc-qtbase/5.15)

    Description

      (I'm just assuming that this issue affects Qt6 as well since the code in the SQLite plugin does not seem to have changed, but I actually didn't verify myself the issue there)

      Please see this thread in the mailing list for context and suggestions: https://lists.qt-project.org/pipermail/development/2021-May/041471.html

      Valgrind reports a use-after-free in the SQLite Qt plugin, because the string returned by QString::utf16() is passed uncopied to the SQL engine, and then the QString itself gets disposed of.
      This sometimes causes the query to not return any results. The program does not crash, though, which makes this issue hard to verify.

      Attachments

        1. test.cpp
          1 kB
        2. valgrind.log
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mabrand Mark Brand
            mardy Alberto Mardegan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes