Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4505

Buffer overrun when processing --log-bin parameter without file name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2, 5.5.30
    • Fix Version/s: 10.0.3, 5.5.31
    • Component/s: None
    • Labels:
      None

      Description

      sql/mysqld.cc:4564:

          if (opt_bin_logname && 
              opt_bin_logname[strlen(opt_bin_logname) - 1] == FN_LIBCHAR)
      

      But when I pass --log-bin without filename the opt_bin_logname is actually an empty string and then the statement accesses invalid memory address. These same code lines work fine on MySQL 5.1, so apparently at some point opt_bin_logname was changed to have empty string instead of NULL.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            pushed in 5.5

            Show
            serg Sergei Golubchik added a comment - pushed in 5.5

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                pivanof Pavel Ivanov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m