Skip to content

[AutoPR- Security] Patch moby-engine for CVE-2026-39882 [MEDIUM]#16681

Merged
kgodara912 merged 3 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/moby-engine/3.0/1095458
Apr 20, 2026
Merged

[AutoPR- Security] Patch moby-engine for CVE-2026-39882 [MEDIUM]#16681
kgodara912 merged 3 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/moby-engine/3.0/1095458

Conversation

@azurelinux-security
Copy link
Copy Markdown
Contributor

@azurelinux-security azurelinux-security commented Apr 15, 2026

Auto Patch moby-engine for CVE-2026-39882.

Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1095458&view=results

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

Change Log
Does this affect the toolchain?

YES/NO

Associated issues
  • N/A
Links to CVEs
Test Methodology

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
3 pipeline(s) require an authorized user to comment /azp run to run.

@Kanishk-Bansal Kanishk-Bansal marked this pull request as ready for review April 15, 2026 11:40
@Kanishk-Bansal Kanishk-Bansal requested a review from a team as a code owner April 15, 2026 11:40
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

Copy link
Copy Markdown
Contributor

@Kanishk-Bansal Kanishk-Bansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch Analysis (Backported - The upstream fix spans 3 exporters (trace/metric/log), but moby-engine v25.0.3 only vendors otlptracehttp which is patched, other files are not present in our source code. Hence not patched by AI)
Fixed the changelog along with this fix.

  • Buddy Build 
  • patch applied during the build (check rpm.log)
  • patch include an upstream reference
  • PR has security tag

@Kanishk-Bansal Kanishk-Bansal added the ready-for-stable-review PR has passed initial review and is now ready for a second-level stable maintainer review label Apr 15, 2026
Copy link
Copy Markdown
Contributor

@kgodara912 kgodara912 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch update is needed.

+ }
return err
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be a partial fix. The upstream has two places where io.Copy is replaced with the updated signature, success and Error cases. Downstream also has the same but in switch case instead of handling it with if else. Following is the snippet,

         switch sc := resp.StatusCode; {
         case sc >= 200 && sc <= 299:
             // Success, do not retry.
             // Read the partial success message, if any.
             var respData bytes.Buffer
             if _, err := io.Copy(&respData, http.MaxBytesReader(nil, resp.Body, maxResponseBodySize)); err != nil 
...
         case sc == http.StatusTooManyRequests, sc == http.StatusServiceUnavailable:
             // Retry-able failures.  Drain the body to reuse the connection.
             if _, err := io.Copy(io.Discard, resp.Body); err != nil {
                 otel.Handle(err)
             }
             return newResponseError(resp.Header)

The io.Copy in error case also, we should put the same bound checking even though we are discarding it but read may still consume same high memory.

Signed-off-by: Kanishk Bansal <kanbansal@microsoft.com>
@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

Build

Copy link
Copy Markdown
Contributor

@kgodara912 kgodara912 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch almost matches with upstream reference except the switch vs if/else and other files not present. Buddy build is successful. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 AI Backport AutoPR-Security Packaging ready-for-stable-review PR has passed initial review and is now ready for a second-level stable maintainer review security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants