Skip to content

[AutoPR- Security] Patch netavark for CVE-2026-25541 [MEDIUM]#15824

Merged
kgodara912 merged 4 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/netavark/3.0/1047686
Mar 9, 2026
Merged

[AutoPR- Security] Patch netavark for CVE-2026-25541 [MEDIUM]#15824
kgodara912 merged 4 commits intomicrosoft:3.0-devfrom
azurelinux-security:azure-autosec/netavark/3.0/1047686

Conversation

@azurelinux-security
Copy link
Copy Markdown
Contributor

@azurelinux-security azurelinux-security commented Feb 12, 2026

Auto Patch netavark for CVE-2026-25541.

Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1047686&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

@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

Buddy Build

@archana25-ms
Copy link
Copy Markdown
Contributor

Buddy Build

Buddy build is successful.

@Kanishk-Bansal Kanishk-Bansal marked this pull request as ready for review February 16, 2026 12:19
@Kanishk-Bansal Kanishk-Bansal requested a review from a team as a code owner February 16, 2026 12:19
Comment thread SPECS/netavark/CVE-2026-25541.patch Outdated

let offset = offset_from(self.ptr.as_ptr(), ptr);

+ let new_cap_plus_offset = new_cap.checked_add(offset).expect("overflow");
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.

This line of change addresses the overflow, but it slightly diverges from upstream semantics.
Upstream handles this via:

match new_cap.checked_add(offset) {
    Some(v) => v,
    None if !allocate => return false,
    None => panic!("overflow"),
}

This preserves the fallible behavior of the non-allocating reserve path.
The use of .expect("overflow") unconditionally panics, altering the behaviour for Overflow + !allocate.

For consistency and easier maintenance, it would be preferable to follow the upstream implementation.

@archana25-ms
Copy link
Copy Markdown
Contributor

Buddy Build link: https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1052126&view=results

Buddy build is successful with updated patch.

@bhagyapathak
Copy link
Copy Markdown
Contributor

@archana25-ms
Copy link
Copy Markdown
Contributor

Updated buddy build - https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1055085&view=results

Buddy build is successful.

Copy link
Copy Markdown
Contributor

@bhagyapathak bhagyapathak 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 (AI Backpor with changes to match the upstream patch)

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

@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 Feb 23, 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 looks fine and buddy build is successful. Please check few minor changes.

Comment thread SPECS/netavark/netavark.spec Outdated
mkdir -p .cargo

cat >.cargo/config << EOF
cat > .cargo/config.toml << 'EOF'
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.

Is this change required to EOF?

Comment thread SPECS/netavark/netavark.spec Outdated

%prep
%autosetup -Sgit -n %{name}-%{built_tag_strip}
%autosetup -N -n %{name}-%{built_tag_strip}
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.

Could you please check if autosetup -a1 can work here? If not, we can at least make autopatch so that future patches we won't miss.

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.

Updated

@kgodara912
Copy link
Copy Markdown
Contributor

Buddy build

@archana25-ms
Copy link
Copy Markdown
Contributor

Buddy build

Buddy Build successful

@kgodara912
Copy link
Copy Markdown
Contributor

Buddy build after recent changes.

@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

/azurepipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@archana25-ms archana25-ms force-pushed the azure-autosec/netavark/3.0/1047686 branch from 8dd55de to 54fa1f8 Compare March 9, 2026 06:59
@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

/azurepipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@archana25-ms archana25-ms force-pushed the azure-autosec/netavark/3.0/1047686 branch from e9ee5d4 to 36f3d93 Compare March 9, 2026 07:26
@Kanishk-Bansal
Copy link
Copy Markdown
Contributor

Buddy 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 matches with other merged PR patches. Buddy build is successful. LGTM.

@kgodara912 kgodara912 merged commit bac998d into microsoft:3.0-dev Mar 9, 2026
17 checks passed
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.

5 participants