Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensuring that binary patches, when reconstituted, are the same as the original #13

Open
david-a-wheeler opened this issue Feb 28, 2023 · 4 comments
Assignees

Comments

@david-a-wheeler
Copy link

Per discussion 2023-02-28, S2C2F should ensure that expansion of binary patches is equivalent to what would be downloaded from scratch.

@david-a-wheeler
Copy link
Author

These are really "binary diffs" to recreate a full update.

@david-a-wheeler
Copy link
Author

david-a-wheeler commented Mar 14, 2023

Basically, the results should be the same if:

  1. You don't have package version 1.0 installed, and you download & install version 1.1
  2. You have package version 1.0 installed, you uninstall it, and download & install version 1.1
  3. You have package version 1.0 installed, and you install a "binary patch" on version 1.0 to produce version 1.1

If the "binary patch" (option 3) produces a different result, it can be hard to figure out what happened. It can be a security vulnerability, since it's likely only the new version was reviewed (not the binary patch).

@adriandiglio adriandiglio self-assigned this Mar 14, 2023
@david-a-wheeler
Copy link
Author

One solution: the receiving client could download a diff (patch file), combine that with the "old" version to create the "full new version", and then verify that the result is the same as the full install (e.g., with a cryptographic hash). Not every client would need to do this, it could be just a test client as part of a test case, and would eliminate the concern about storage space used up in most clients. That approach would ensure that all are getting the same thing.

@david-a-wheeler
Copy link
Author

There may be other solutions, but having one solution is good :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants