Skip to content

Conversation

@BHAVISHYA2005
Copy link

@BHAVISHYA2005 BHAVISHYA2005 commented Nov 27, 2025

Fix: Handle nginx-stable mail module size corruption (#73275)

Fixes: #73275

Related: N/A

Description

The nginx-stable-mod-mail subpackage was generating a corrupted size field in the APKINDEX,
reporting an impossible size of 18446744073709551615 (UINT64_MAX / 2^64-1) instead of the
actual package size.

Root Cause

The mail module subpackage extraction was failing silently:

  • Mail is configured as --with-mail=dynamic (should generate a .so file)
  • The pipeline tries to move ngx_mail_module.so but it doesn't exist in the expected location
  • The empty/malformed subpackage causes a size calculation overflow in melange
  • Result: Size field gets set to UINT64_MAX

Solution

Added specific error handling for the mail module case in the subpackage pipeline:

  • Check if ngx_mail_module.so exists before attempting to move it
  • Log a warning if the file is not found

Verification

The issue was reproduced with:

curl -s https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz | tar -xzf - APKINDEX
grep -B5 "^S:18446744073709551615" APKINDEX

@BHAVISHYA2005 BHAVISHYA2005 force-pushed the fix/nginx-stable-mod-mail-size-corruption branch from e34d092 to 1e7decb Compare November 27, 2025 07:59
@imjasonh imjasonh added the approved-to-run A repo member has approved this external contribution label Nov 29, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-to-run A repo member has approved this external contribution bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nginx-stable-mod-mail package has corrupted size field in APKINDEX

2 participants