Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-921

exposure of partial writes with encryption (and multiprocess)

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      When encryption is enabled, we write sectors of the file in a non-atomic fashion. In case the writing process is aborted (app process terminated) in the midst of such a write, the sector will only be partially written, leading to a corrupted file.

      It is unclear if this bug has been observed IRL, but it is clearly possible.

      This problem is even more important if/when we want to support multi-process encryption, because it allows another process to observe partial writes (by reading at the wrong moment), which will be seen as file corruption, even when the writes later complete and the file is not corrupt.

      This bug has been present since our first implementation of encryption.

            Assignee:
            finn.schiermer-andersen@mongodb.com Finn Andersen
            Reporter:
            finn.schiermer-andersen@mongodb.com Finn Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: