extra-data mechanism not suitable for multi-gigabyte downloads

Open
#6,828 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
backend

Research direction

The issue identifies Flatpak’s use of GLib’s g_compute_checksum_for_bytes and g_compute_checksum_for_data, but names no Flatpak source file or test. First read the upstream GLib issue GNOME/glib#4052 and trace the checksum calls used for extra-data verification. Done means a greater-than-8-GB extra-data blob produces the same SHA-256 checksum in Flatpak as sha256sum.

Written by the indexing model from the issue text.

Description

needs triage
Checklist
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).
Flatpak version

Flatpak 1.19.1

What Linux distribution are you using?

Fedora Silverblue

Linux distribution version

44

What architecture are you using?

x86_64

How to reproduce

This is an upstream bug in glib g_compute_checksum_for_bytes and g_compute_checksum_for_data.

I'm creating this flatpak issue as a tracker since flatpak makes heavy used of g_compute_checksum_for_bytes internally.

Create a flatpak with an extra-data blob which is >8GB.

The checksum verification will fail; sha256sum on the extra-data blob gives a different result to Flatpak.

Expected Behavior

The sha256sum for extra-data blobs >8GB should match.

Actual Behavior

The sha256sum for extra-data blobs >8GB do not match.

Additional Information

I opened:
GNOME/glib#4052
to track the upstream issue.

Dominant language
C
Stars
5.1k
Forks
526
Avg merge
3d 1h
Merged PRs (30d)
23

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flatpak/flatpak

All issues in flatpak/flatpak

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.