Bug 1462565 - RPMs >4GB are not supported with the sign-rpms wire protocol
RPMs >4GB are not supported with the sign-rpms wire protocol
Product: Fedora EPEL
Classification: Fedora
Component: sigul (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Patrick Uiterwijk
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-06-18 19:19 EDT by Patrick Uiterwijk
Modified: 2017-06-19 02:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Patrick Uiterwijk 2017-06-18 19:19:20 EDT
The current wire protocol encodes the payload size as a 32-bit unsigned integer.
This means that if an RPM is larger than 4GB, it cannot be encoded and the signing fails.

The exception:
Traceback (most recent call last):
  File "/usr/share/sigul/utils.py", line 681, in run
  File "/usr/share/sigul/bridge.py", line 693, in _real_run
  File "/usr/share/sigul/bridge.py", line 713, in __handle_one_rpm
  File "/usr/share/sigul/utils.py", line 201, in u32_pack
    return struct.pack(_u32_format, v)
error: 'I' format requires 0 <= number <= 4294967295

Fixing this probably requires a change to the wire protocol details for the sign-rpms call.

This was found due to #1456261.
Comment 1 Patrick Uiterwijk 2017-06-19 02:09:21 EDT
Funny detail: this was already marked as FIXME in the protocol design:

** u32 L payload length
   The payload length limit is request-specific.
   FIXME: should be u64?

I don't think there's a sane way to fix this without bumping the protocol_version, so I guess we will just raise this to u64 and increase protocol_version to 1.

This does mean we will need to add the code to the bridge to check the servers' protocol_version, which the code currently mentions as not implemented, which so far with a single protocol version wasn't such a big deal.

I think I'm going to combine this with the moving of signature stripping to the server for the koji case (https://bugzilla.redhat.com/show_bug.cgi?id=1367568#c3).

Note You need to log in before you can comment on or make changes to this bug.