Skip to content

cmd/compile: possible memory corruption after bound check elimination #78333

Closed

Description

@neild

Previously, slices and arrays accessed using induction variables
were sometimes incorrectly proved in-bound. If the induction variable
used for indexing were to overflow or underflow, it could allow access
to memory beyond the scope of the original slice or array.

To prevent this behavior, the compiler ensures that any mutated induction
variable that overflows/underflows with respect to its loop condition
is not used for bound check elimination.

Thank you to Jakub Ciolek - https://ciolek.dev/ for reporting this issue.

This is CVE-2026-27143 and Go issue https://go.dev/issue/78333.


This is a PRIVATE issue for CVE-2026-27143, tracked in http://b/489466309 and fixed by https://go-internal-review.git.corp.google.com/c/go/+/3700.

/cc @golang/security and @golang/release

Activity

  1. added this to the Go1.27 milestone on Mar 24, 2026
  2. added
    BugReportIssues describing a possible bug in the Go implementation.
    on Mar 24, 2026
  3. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Mar 25, 2026
  4. neild commented on Mar 27, 2026

    @neild
    ContributorAuthor

    @gopherbot please open backport issues for this security fix

  5. gopherbot commented on Mar 27, 2026

    @gopherbot
    Contributor

    Backport issue(s) opened: #78419 (for 1.25), #78420 (for 1.26).

    Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

  6. gopherbot commented on Apr 7, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/763546 mentions this issue: [release-branch.go1.26] cmd/compile: fix loopbce overflow check logic

  7. gopherbot commented on Apr 7, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/763553 mentions this issue: [release-branch.go1.25] cmd/compile: fix loopbce overflow check logic

  8. added 2 commits that reference this issue on Apr 7, 2026
    7d2dd34
    c4b4bd7
  9. changed the title [-]security: fix CVE-2026-27143[/-] [+]cmd/compile: possible memory corruption after bound check elimination[/+] on Apr 7, 2026
  10. gopherbot commented on Apr 7, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/763765 mentions this issue: cmd/compile: fix loopbce overflow check logic

  11. added a commit that references this issue on Apr 8, 2026
    f5b77a7
  12. added a commit that references this issue on Jul 22, 2026
    58a67c8
  13. added a commit that references this issue on Sep 4, 2026
    ba5881a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.Securitycompiler/runtimeIssues related to the Go compiler and/or runtime.release-blocker

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions