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

BINLOG REPLAY privilege is sufficient to manipulate history of any versioned table

    XMLWordPrintable

Details

    Description

      System versioning history can be modified (inserted, updated, deleted) by executing a row event via BINLOG command, regardless of the value of secure_timestamp.

      create database db;
      create table db.t (a int) with system versioning;
       
      create user ubinlog;
      grant BINLOG REPLAY on *.* to ubinlog;
       
      --connect(con1,localhost,ubinlog,,)
       
      # Format description event
      BINLOG '
      719BYw8BAAAA/AAAAAABAAAAAAQAMTAuMTEuMC1NYXJpYURCLWRlYnVnLWxvZwAAAAAAAAAAAAAA
      AAAAAAAAAAAAAAAAAADvX0FjEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA
      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      AAAAAAAAAAAEEwQADQgICAoKCgFOe+tK
      '/*!*/;
       
      # Write event, inserting a 3-field row into db.t table
      BINLOG '
      KmBBYxMBAAAALgAAAMQDAAAAABIAAAAAAAEAAmRiAAF0AAMDERECBgYH/lbeqQ==
      KmBBYxcBAAAANAAAAPgDAAAAABIAAAAAAAEAA//4AQAAAGHPfWAAAABjsLDgAAAAwopO7w==
      '/*!*/;
       
      --disconnect con1
      --connection default
       
      select a, row_start, row_end from db.t for system_time all;
       
      # Cleanup
      drop database db;
      drop user ubinlog;
      

      (for 10.3/10.4 BINLOG REPLAY in the test case needs to be replaced by SUPER).

      10.5 7865c8c9

      connection default;
      select a, row_start, row_end from db.t for system_time all;
      a	row_start	row_end
      1	2022-01-01 00:00:00.000000	2023-01-01 00:00:00.000000
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.