Skip to content

[Medium] Patch nasm for CVE-2022-46456#16149

Open
Ratiranjan5 wants to merge 1 commit intomicrosoft:3.0-devfrom
Ratiranjan5:topic_nasm-3.0
Open

[Medium] Patch nasm for CVE-2022-46456#16149
Ratiranjan5 wants to merge 1 commit intomicrosoft:3.0-devfrom
Ratiranjan5:topic_nasm-3.0

Conversation

@Ratiranjan5
Copy link
Contributor

@Ratiranjan5 Ratiranjan5 commented Mar 10, 2026

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?
Patch nasm for CVE-2022-46456
Upstream Patch reference: netwide-assembler/nasm@e05867c
Patch modified: Yes

  • This PR addresses the global buffer overflow in nasm caused by unsafe indexing in the dbgdbg_typevalue() function located in output/outdbg.c.
  • Although the upstream patch includes changes across multiple files such as Makefile.in, asm/, disasm/, include/, x86/, and test/segover.asm etc, those changes primarily consist of refactoring, restructuring, new source files, regenerated tables, test additions, and other unrelated functional updates to this CVE.
  • The vulnerability is isolated exclusively to dbgdbg_typevalue() in output/outdbg.c. No other files are required to fix this issue in nasm‑2.16.01. Patching output/outdbg.c alone is sufficient to fully resolve this CVE.

Additional build fix:

  • Local build fails in asm/warnings.pl with Can't locate File/Find.pm in @INC.
    The minimal build chroot lacks the File::Find Perl module, Adding the appropriate Perl BuildRequires in spec file to resolves the issue.
Change Log
  • new file: SPECS/nasm/CVE-2022-46456.patch
  • modified: SPECS/nasm/nasm.spec
Does this affect the toolchain?

NO

Associated issues
image
Links to CVEs
Test Methodology
  • Local build was successful.
CVE-2022-46456_BuildSuccess
  • Patch applies cleanly.
CVE-2022-46456_PatchApplication image
  • Check uninstallation:
image

@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Mar 10, 2026
@Ratiranjan5 Ratiranjan5 marked this pull request as ready for review March 10, 2026 07:22
@Ratiranjan5 Ratiranjan5 requested a review from a team as a code owner March 10, 2026 07:22
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 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants