[text] secure/precis: fix short destination buffer handling in Nickname profile

11 views
Skip to first unread message

Ian Alexander (Gerrit)

unread,
Jun 23, 2026, 12:41:49 PMJun 23
to goph...@pubsubhelper.golang.org, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com
Attention needed from Damien Neil and Nicholas Husin

Ian Alexander voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Damien Neil
  • Nicholas Husin
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: text
Gerrit-Branch: master
Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
Gerrit-Change-Number: 793360
Gerrit-PatchSet: 1
Gerrit-Owner: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
Gerrit-Attention: Damien Neil <dn...@google.com>
Gerrit-Attention: Nicholas Husin <n...@golang.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 16:41:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Alexander (Gerrit)

unread,
Jun 23, 2026, 12:54:59 PMJun 23
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Damien Neil and Nicholas Husin

Ian Alexander uploaded new patchset

Ian Alexander uploaded patch set #2 to this change.
Following approvals got outdated and were removed:
Open in Gerrit

Related details

Attention is currently required from:
  • Damien Neil
  • Nicholas Husin
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: text
Gerrit-Branch: master
Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
Gerrit-Change-Number: 793360
Gerrit-PatchSet: 2
Gerrit-Owner: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
unsatisfied_requirement
satisfied_requirement
open
diffy

Ian Alexander (Gerrit)

unread,
Jun 23, 2026, 12:55:18 PMJun 23
to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com
Attention needed from Damien Neil and Nicholas Husin

Ian Alexander voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Damien Neil
  • Nicholas Husin
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: text
Gerrit-Branch: master
Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
Gerrit-Change-Number: 793360
Gerrit-PatchSet: 2
Gerrit-Owner: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
Gerrit-Attention: Damien Neil <dn...@google.com>
Gerrit-Attention: Nicholas Husin <n...@golang.org>
Gerrit-Comment-Date: Tue, 23 Jun 2026 16:55:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Damien Neil (Gerrit)

unread,
Jun 23, 2026, 2:15:36 PMJun 23
to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
Attention needed from Ian Alexander and Nicholas Husin

Damien Neil added 3 comments

Commit Message
Line 20, Patchset 2 (Latest):Fixes CVE-2026-56851
Damien Neil . unresolved

Reference public issue (file public issue if none exists yet).

File secure/precis/nickname.go
Line 61, Patchset 2 (Latest): if nDst+need > len(dst) {
Damien Neil . unresolved

This changes the function behavior when dst is too short: Previously, it would fill as much of dst as possible, while now it may fill only part of dst.

I don't know if this matters, but it's simple to avoid changing it so let's keep things as stable as possible: When assigning `dst[nDst] = ' '`, we can return an error if `nDst >= len(dst)`.

File secure/precis/nickname_test.go
Line 11, Patchset 2 (Latest):func TestTransform(t *testing.T) {
Damien Neil . unresolved

There's a `TestTransformShortBuffers` in enforce_test.go. Looks like it currently only uses a profile that doesn't exercise the Nickname case. Can we make this run with various profiles (and possibly inputs) to exercise this fix?

Open in Gerrit

Related details

Attention is currently required from:
  • Ian Alexander
  • Nicholas Husin
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: text
    Gerrit-Branch: master
    Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
    Gerrit-Change-Number: 793360
    Gerrit-PatchSet: 2
    Gerrit-Owner: Ian Alexander <ji...@google.com>
    Gerrit-Reviewer: Damien Neil <dn...@google.com>
    Gerrit-Reviewer: Ian Alexander <ji...@google.com>
    Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
    Gerrit-Attention: Ian Alexander <ji...@google.com>
    Gerrit-Attention: Nicholas Husin <n...@golang.org>
    Gerrit-Comment-Date: Tue, 23 Jun 2026 18:15:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Ian Alexander (Gerrit)

    unread,
    Jul 14, 2026, 1:16:45 PMJul 14
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Ian Alexander and Nicholas Husin

    Ian Alexander uploaded new patchset

    Ian Alexander uploaded patch set #3 to this change.
    Following approvals got outdated and were removed:

    Related details

    Attention is currently required from:
    • Ian Alexander
    • Nicholas Husin
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: text
      Gerrit-Branch: master
      Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
      Gerrit-Change-Number: 793360
      Gerrit-PatchSet: 3
      unsatisfied_requirement
      open
      diffy

      Ian Alexander (Gerrit)

      unread,
      Jul 14, 2026, 1:22:51 PMJul 14
      to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com
      Attention needed from Damien Neil and Nicholas Husin

      Ian Alexander voted and added 3 comments

      Votes added by Ian Alexander

      Commit-Queue+1

      3 comments

      Commit Message
      Line 20, Patchset 2:Fixes CVE-2026-56851
      Damien Neil . resolved

      Reference public issue (file public issue if none exists yet).

      Ian Alexander

      Done

      File secure/precis/nickname.go
      Line 61, Patchset 2: if nDst+need > len(dst) {
      Damien Neil . resolved

      This changes the function behavior when dst is too short: Previously, it would fill as much of dst as possible, while now it may fill only part of dst.

      I don't know if this matters, but it's simple to avoid changing it so let's keep things as stable as possible: When assigning `dst[nDst] = ' '`, we can return an error if `nDst >= len(dst)`.

      Ian Alexander

      Done

      File secure/precis/nickname_test.go
      Line 11, Patchset 2:func TestTransform(t *testing.T) {
      Damien Neil . resolved

      There's a `TestTransformShortBuffers` in enforce_test.go. Looks like it currently only uses a profile that doesn't exercise the Nickname case. Can we make this run with various profiles (and possibly inputs) to exercise this fix?

      Ian Alexander

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Damien Neil
      • Nicholas Husin
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: text
        Gerrit-Branch: master
        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
        Gerrit-Change-Number: 793360
        Gerrit-PatchSet: 3
        Gerrit-Owner: Ian Alexander <ji...@google.com>
        Gerrit-Reviewer: Damien Neil <dn...@google.com>
        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
        Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
        Gerrit-Attention: Damien Neil <dn...@google.com>
        Gerrit-Attention: Nicholas Husin <n...@golang.org>
        Gerrit-Comment-Date: Tue, 14 Jul 2026 17:22:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Damien Neil <dn...@google.com>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Damien Neil (Gerrit)

        unread,
        Jul 14, 2026, 3:56:46 PMJul 14
        to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
        Attention needed from Ian Alexander and Nicholas Husin

        Damien Neil added 5 comments

        Patchset-level comments
        File-level comment, Patchset 3 (Latest):
        Damien Neil . resolved

        Full disclosure: Gemini found all of this.

        File secure/precis/nickname.go
        Line 48, Patchset 3 (Latest): if size == 0 { // Incomplete UTF-8 encoding
        Damien Neil . unresolved

        Preexisting problem: size is never 0, `DecodeRune` returns `(RuneError, 1)` when encountering a partial rune.

        This results in, for example, `"a\xef\xb7"` (an input ending in an incomplete 3-byte rune) returning `"a\xef\xb7"` rather than `"a"` and ErrShortSrc.

        Line 65, Patchset 3 (Latest): return nDst, nSrc, transform.ErrShortDst
        Damien Neil . unresolved

        This leaves t.prevSpace set, but the space has already been appended to the destination.

        For example, `"a b"` with a 2-byte destination produces `"a "`, and the next call produces `" b"` rather than `"b"`.

        Line 69, Patchset 3 (Latest): return nDst, nSrc, transform.ErrShortDst
        Damien Neil . unresolved

        This can write part of a multi-byte rune to the dst without advancing nSrc.

        For example, `"\uFDFA"` (a 3-byte rune) with a 2-byte destination produces nSrc=0, nDst=2, and `"\xef\xb7"`. It should produce nSrc=0, nDst=0.

        Line 78, Patchset 3 (Latest): return nDst, nSrc, transform.ErrShortSrc
        Damien Neil . unresolved

        Most transformers return a nil error when `nSrc == len(src) && !atEOF` (all source bytes consumed and written to dst, no dangling state).

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Ian Alexander
        • Nicholas Husin
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: text
          Gerrit-Branch: master
          Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
          Gerrit-Change-Number: 793360
          Gerrit-PatchSet: 3
          Gerrit-Owner: Ian Alexander <ji...@google.com>
          Gerrit-Reviewer: Damien Neil <dn...@google.com>
          Gerrit-Reviewer: Ian Alexander <ji...@google.com>
          Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
          Gerrit-Attention: Ian Alexander <ji...@google.com>
          Gerrit-Attention: Nicholas Husin <n...@golang.org>
          Gerrit-Comment-Date: Tue, 14 Jul 2026 19:56:41 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Ian Alexander (Gerrit)

          unread,
          Jul 15, 2026, 12:48:44 AMJul 15
          to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Ian Alexander and Nicholas Husin

          Ian Alexander uploaded new patchset

          Ian Alexander uploaded patch set #4 to this change.
          Following approvals got outdated and were removed:

          Related details

          Attention is currently required from:
          • Ian Alexander
          • Nicholas Husin
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: text
            Gerrit-Branch: master
            Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
            Gerrit-Change-Number: 793360
            Gerrit-PatchSet: 4
            unsatisfied_requirement
            open
            diffy

            Ian Alexander (Gerrit)

            unread,
            Jul 15, 2026, 1:06:29 AMJul 15
            to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Ian Alexander and Nicholas Husin

            Ian Alexander uploaded new patchset

            Ian Alexander uploaded patch set #5 to this change.
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ian Alexander
            • Nicholas Husin
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: text
            Gerrit-Branch: master
            Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
            Gerrit-Change-Number: 793360
            Gerrit-PatchSet: 5
            unsatisfied_requirement
            open
            diffy

            Ian Alexander (Gerrit)

            unread,
            Jul 15, 2026, 1:16:40 AMJul 15
            to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Ian Alexander and Nicholas Husin

            Ian Alexander uploaded new patchset

            Ian Alexander uploaded patch set #6 to this change.
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Ian Alexander
            • Nicholas Husin
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: text
            Gerrit-Branch: master
            Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
            Gerrit-Change-Number: 793360
            Gerrit-PatchSet: 6
            unsatisfied_requirement
            open
            diffy

            Ian Alexander (Gerrit)

            unread,
            Jul 15, 2026, 1:17:20 AMJul 15
            to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com
            Attention needed from Damien Neil and Nicholas Husin

            Ian Alexander voted and added 4 comments

            Votes added by Ian Alexander

            Commit-Queue+1

            4 comments

            File secure/precis/nickname.go
            Line 48, Patchset 3: if size == 0 { // Incomplete UTF-8 encoding
            Damien Neil . resolved

            Preexisting problem: size is never 0, `DecodeRune` returns `(RuneError, 1)` when encountering a partial rune.

            This results in, for example, `"a\xef\xb7"` (an input ending in an incomplete 3-byte rune) returning `"a\xef\xb7"` rather than `"a"` and ErrShortSrc.

            Ian Alexander

            Done

            Line 65, Patchset 3: return nDst, nSrc, transform.ErrShortDst
            Damien Neil . resolved

            This leaves t.prevSpace set, but the space has already been appended to the destination.

            For example, `"a b"` with a 2-byte destination produces `"a "`, and the next call produces `" b"` rather than `"b"`.

            Ian Alexander

            Done

            Line 69, Patchset 3: return nDst, nSrc, transform.ErrShortDst
            Damien Neil . resolved

            This can write part of a multi-byte rune to the dst without advancing nSrc.

            For example, `"\uFDFA"` (a 3-byte rune) with a 2-byte destination produces nSrc=0, nDst=2, and `"\xef\xb7"`. It should produce nSrc=0, nDst=0.

            Ian Alexander

            Done

            Line 78, Patchset 3: return nDst, nSrc, transform.ErrShortSrc
            Damien Neil . resolved

            Most transformers return a nil error when `nSrc == len(src) && !atEOF` (all source bytes consumed and written to dst, no dangling state).

            Ian Alexander

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Damien Neil
            • Nicholas Husin
            Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: text
              Gerrit-Branch: master
              Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
              Gerrit-Change-Number: 793360
              Gerrit-PatchSet: 6
              Gerrit-Owner: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Damien Neil <dn...@google.com>
              Gerrit-Reviewer: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
              Gerrit-Attention: Damien Neil <dn...@google.com>
              Gerrit-Attention: Nicholas Husin <n...@golang.org>
              Gerrit-Comment-Date: Wed, 15 Jul 2026 05:17:16 +0000
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Ian Alexander (Gerrit)

              unread,
              Jul 15, 2026, 2:19:02 AMJul 15
              to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
              Attention needed from Damien Neil and Nicholas Husin

              Ian Alexander uploaded new patchset

              Ian Alexander uploaded patch set #7 to this change.
              Following approvals got outdated and were removed:
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Damien Neil
              • Nicholas Husin
              Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: newpatchset
              Gerrit-Project: text
              Gerrit-Branch: master
              Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
              Gerrit-Change-Number: 793360
              Gerrit-PatchSet: 7
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Ian Alexander (Gerrit)

              unread,
              Jul 17, 2026, 11:29:41 AMJul 17
              to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com
              Attention needed from Damien Neil and Nicholas Husin

              Ian Alexander voted Commit-Queue+1

              Commit-Queue+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Damien Neil
              • Nicholas Husin
              Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: text
              Gerrit-Branch: master
              Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
              Gerrit-Change-Number: 793360
              Gerrit-PatchSet: 7
              Gerrit-Owner: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Damien Neil <dn...@google.com>
              Gerrit-Reviewer: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
              Gerrit-Attention: Damien Neil <dn...@google.com>
              Gerrit-Attention: Nicholas Husin <n...@golang.org>
              Gerrit-Comment-Date: Fri, 17 Jul 2026 15:29:36 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Damien Neil (Gerrit)

              unread,
              Jul 17, 2026, 6:18:40 PMJul 17
              to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
              Attention needed from Ian Alexander and Nicholas Husin

              Damien Neil voted and added 2 comments

              Votes added by Damien Neil

              Code-Review+2

              2 comments

              File secure/precis/profile.go
              Line 360, Patchset 7 (Latest): return n, transform.ErrShortSrc
              Damien Neil . unresolved

              I don't think this and the next three ErrShortSrc returns are correct. In this case, for example, we've detected a disallowed rune. Getting more data isn't going to change the rune into something allowed.

              Line 402, Patchset 7 (Latest): return n, transform.ErrShortSrc
              Damien Neil . resolved

              I think this ErrShortSrc return is correct, however, because the error here is for unterminated rules which might be terminated by following input.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Ian Alexander
              • Nicholas Husin
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              • requirement satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: text
              Gerrit-Branch: master
              Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
              Gerrit-Change-Number: 793360
              Gerrit-PatchSet: 7
              Gerrit-Owner: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Damien Neil <dn...@google.com>
              Gerrit-Reviewer: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
              Gerrit-Attention: Ian Alexander <ji...@google.com>
              Gerrit-Attention: Nicholas Husin <n...@golang.org>
              Gerrit-Comment-Date: Fri, 17 Jul 2026 22:18:37 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Damien Neil (Gerrit)

              unread,
              Jul 17, 2026, 6:18:51 PMJul 17
              to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
              Attention needed from Ian Alexander and Nicholas Husin

              Damien Neil voted and added 1 comment

              Votes added by Damien Neil

              Code-Review+0

              1 comment

              Patchset-level comments
              File-level comment, Patchset 7 (Latest):
              Damien Neil . resolved

              wrong button

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Ian Alexander
              • Nicholas Husin
              Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: text
              Gerrit-Branch: master
              Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
              Gerrit-Change-Number: 793360
              Gerrit-PatchSet: 7
              Gerrit-Owner: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Damien Neil <dn...@google.com>
              Gerrit-Reviewer: Ian Alexander <ji...@google.com>
              Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
              Gerrit-Attention: Ian Alexander <ji...@google.com>
              Gerrit-Attention: Nicholas Husin <n...@golang.org>
              Gerrit-Comment-Date: Fri, 17 Jul 2026 22:18:47 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Ian Alexander (Gerrit)

              unread,
              Jul 20, 2026, 4:25:55 PMJul 20
              to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
              Attention needed from Ian Alexander and Nicholas Husin

              Ian Alexander uploaded new patchset

              Ian Alexander uploaded patch set #8 to this change.
              Following approvals got outdated and were removed:

              Related details

              Attention is currently required from:
              • Ian Alexander
              • Nicholas Husin
              Submit Requirements:
                • requirement is not satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • requirement is not satisfiedReview-Enforcement
                • requirement is not satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: newpatchset
                Gerrit-Project: text
                Gerrit-Branch: master
                Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                Gerrit-Change-Number: 793360
                Gerrit-PatchSet: 8
                unsatisfied_requirement
                open
                diffy

                Ian Alexander (Gerrit)

                unread,
                Jul 20, 2026, 4:26:26 PMJul 20
                to goph...@pubsubhelper.golang.org, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
                Attention needed from Damien Neil and Nicholas Husin

                Ian Alexander voted and added 1 comment

                Votes added by Ian Alexander

                Commit-Queue+1

                1 comment

                File secure/precis/profile.go
                Line 360, Patchset 7: return n, transform.ErrShortSrc
                Damien Neil . resolved

                I don't think this and the next three ErrShortSrc returns are correct. In this case, for example, we've detected a disallowed rune. Getting more data isn't going to change the rune into something allowed.

                Ian Alexander

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Damien Neil
                • Nicholas Husin
                Submit Requirements:
                  • requirement is not satisfiedCode-Review
                  • requirement satisfiedNo-Unresolved-Comments
                  • requirement is not satisfiedReview-Enforcement
                  • requirement is not satisfiedTryBots-Pass
                  Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                  Gerrit-MessageType: comment
                  Gerrit-Project: text
                  Gerrit-Branch: master
                  Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                  Gerrit-Change-Number: 793360
                  Gerrit-PatchSet: 8
                  Gerrit-Owner: Ian Alexander <ji...@google.com>
                  Gerrit-Reviewer: Damien Neil <dn...@google.com>
                  Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                  Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                  Gerrit-Attention: Damien Neil <dn...@google.com>
                  Gerrit-Attention: Nicholas Husin <n...@golang.org>
                  Gerrit-Comment-Date: Mon, 20 Jul 2026 20:26:22 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  Comment-In-Reply-To: Damien Neil <dn...@google.com>
                  unsatisfied_requirement
                  satisfied_requirement
                  open
                  diffy

                  Damien Neil (Gerrit)

                  unread,
                  Jul 20, 2026, 5:25:02 PMJul 20
                  to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
                  Attention needed from Ian Alexander and Nicholas Husin

                  Damien Neil added 2 comments

                  File secure/precis/nickname.go
                  Line 48, Patchset 8 (Latest): return nDst, nSrc, transform.ErrShortSrc
                  Damien Neil . unresolved

                  Sorry, I missed this previously:

                  We should return ErrShortSrc here if !atEOF, because we have a partial rune which can be completed by more data.

                  However, we should never return ErrShortSrc when atEOF, because there's no more data coming. A reasonable thing to do would be to set r=utf8.RuneError, size=1 when when encountering a partial rune at EOF.

                  File secure/precis/profile.go
                  Line 353, Patchset 8 (Latest): return n, transform.ErrShortSrc
                  Damien Neil . unresolved

                  Here also: This should return ErrShortSrc when !atEOF, and errDisallowedRune otherwise.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Ian Alexander
                  • Nicholas Husin
                  Submit Requirements:
                    • requirement is not satisfiedCode-Review
                    • requirement is not satisfiedNo-Unresolved-Comments
                    • requirement is not satisfiedReview-Enforcement
                    • requirement satisfiedTryBots-Pass
                    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                    Gerrit-MessageType: comment
                    Gerrit-Project: text
                    Gerrit-Branch: master
                    Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                    Gerrit-Change-Number: 793360
                    Gerrit-PatchSet: 8
                    Gerrit-Owner: Ian Alexander <ji...@google.com>
                    Gerrit-Reviewer: Damien Neil <dn...@google.com>
                    Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                    Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                    Gerrit-Attention: Ian Alexander <ji...@google.com>
                    Gerrit-Attention: Nicholas Husin <n...@golang.org>
                    Gerrit-Comment-Date: Mon, 20 Jul 2026 21:24:57 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    unsatisfied_requirement
                    satisfied_requirement
                    open
                    diffy

                    Ian Alexander (Gerrit)

                    unread,
                    Jul 21, 2026, 11:43:48 AMJul 21
                    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
                    Attention needed from Ian Alexander and Nicholas Husin

                    Ian Alexander uploaded new patchset

                    Ian Alexander uploaded patch set #9 to this change.
                    Following approvals got outdated and were removed:

                    Related details

                    Attention is currently required from:
                    • Ian Alexander
                    • Nicholas Husin
                    Submit Requirements:
                      • requirement is not satisfiedCode-Review
                      • requirement is not satisfiedNo-Unresolved-Comments
                      • requirement is not satisfiedReview-Enforcement
                      • requirement is not satisfiedTryBots-Pass
                      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                      Gerrit-MessageType: newpatchset
                      Gerrit-Project: text
                      Gerrit-Branch: master
                      Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                      Gerrit-Change-Number: 793360
                      Gerrit-PatchSet: 9
                      unsatisfied_requirement
                      open
                      diffy

                      Ian Alexander (Gerrit)

                      unread,
                      Jul 21, 2026, 11:44:21 AMJul 21
                      to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Damien Neil, Nicholas Husin, golang-co...@googlegroups.com
                      Attention needed from Damien Neil and Nicholas Husin

                      Ian Alexander voted and added 2 comments

                      Votes added by Ian Alexander

                      Commit-Queue+1

                      2 comments

                      File secure/precis/nickname.go
                      Line 48, Patchset 8: return nDst, nSrc, transform.ErrShortSrc
                      Damien Neil . resolved

                      Sorry, I missed this previously:

                      We should return ErrShortSrc here if !atEOF, because we have a partial rune which can be completed by more data.

                      However, we should never return ErrShortSrc when atEOF, because there's no more data coming. A reasonable thing to do would be to set r=utf8.RuneError, size=1 when when encountering a partial rune at EOF.

                      Ian Alexander

                      Done

                      File secure/precis/profile.go
                      Line 353, Patchset 8: return n, transform.ErrShortSrc
                      Damien Neil . resolved

                      Here also: This should return ErrShortSrc when !atEOF, and errDisallowedRune otherwise.

                      Ian Alexander

                      Done

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Damien Neil
                      • Nicholas Husin
                      Submit Requirements:
                        • requirement is not satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement is not satisfiedReview-Enforcement
                        • requirement is not satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: text
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Gerrit-Change-Number: 793360
                        Gerrit-PatchSet: 9
                        Gerrit-Owner: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Damien Neil <dn...@google.com>
                        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                        Gerrit-Attention: Damien Neil <dn...@google.com>
                        Gerrit-Attention: Nicholas Husin <n...@golang.org>
                        Gerrit-Comment-Date: Tue, 21 Jul 2026 15:44:17 +0000
                        unsatisfied_requirement
                        satisfied_requirement
                        open
                        diffy

                        Damien Neil (Gerrit)

                        unread,
                        Jul 21, 2026, 8:14:01 PMJul 21
                        to Ian Alexander, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com
                        Attention needed from Ian Alexander and Nicholas Husin

                        Damien Neil voted and added 1 comment

                        Votes added by Damien Neil

                        Code-Review+2

                        1 comment

                        Patchset-level comments
                        File-level comment, Patchset 9 (Latest):
                        Damien Neil . resolved

                        Thanks for bearing with me.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Alexander
                        • Nicholas Husin
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: text
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Gerrit-Change-Number: 793360
                        Gerrit-PatchSet: 9
                        Gerrit-Owner: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Damien Neil <dn...@google.com>
                        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                        Gerrit-Attention: Ian Alexander <ji...@google.com>
                        Gerrit-Attention: Nicholas Husin <n...@golang.org>
                        Gerrit-Comment-Date: Wed, 22 Jul 2026 00:13:57 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        open
                        diffy

                        Nicholas Husin (Gerrit)

                        unread,
                        Jul 28, 2026, 3:21:13 PM (13 days ago) Jul 28
                        to Ian Alexander, goph...@pubsubhelper.golang.org, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
                        Attention needed from Ian Alexander

                        Nicholas Husin added 1 comment

                        Commit Message
                        Line 21, Patchset 9 (Latest):Fixes golang/go#80112
                        Nicholas Husin . unresolved

                        Reminder to cherrypick to 1.27 release branch too.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Alexander
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement is not satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: text
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Gerrit-Change-Number: 793360
                        Gerrit-PatchSet: 9
                        Gerrit-Owner: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Damien Neil <dn...@google.com>
                        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                        Gerrit-Attention: Ian Alexander <ji...@google.com>
                        Gerrit-Comment-Date: Tue, 28 Jul 2026 19:21:10 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Nicholas Husin (Gerrit)

                        unread,
                        Jul 28, 2026, 4:57:48 PM (13 days ago) Jul 28
                        to Ian Alexander, goph...@pubsubhelper.golang.org, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
                        Attention needed from Ian Alexander

                        Nicholas Husin added 1 comment

                        Commit Message
                        Line 21, Patchset 9 (Latest):Fixes golang/go#80112
                        Nicholas Husin . resolved

                        Reminder to cherrypick to 1.27 release branch too.

                        Nicholas Husin

                        Oops, nevermind, this is not used in std.

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • Ian Alexander
                        Submit Requirements:
                        • requirement satisfiedCode-Review
                        • requirement satisfiedNo-Unresolved-Comments
                        • requirement satisfiedReview-Enforcement
                        • requirement satisfiedTryBots-Pass
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: comment
                        Gerrit-Project: text
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Gerrit-Change-Number: 793360
                        Gerrit-PatchSet: 9
                        Gerrit-Owner: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Damien Neil <dn...@google.com>
                        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
                        Gerrit-Attention: Ian Alexander <ji...@google.com>
                        Gerrit-Comment-Date: Tue, 28 Jul 2026 20:57:44 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: No
                        Comment-In-Reply-To: Nicholas Husin <n...@golang.org>
                        satisfied_requirement
                        open
                        diffy

                        Mark Freeman (Gerrit)

                        unread,
                        Aug 5, 2026, 4:15:43 PM (5 days ago) Aug 5
                        to Ian Alexander, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, golang-co...@googlegroups.com

                        Mark Freeman submitted the change

                        Change information

                        Commit message:
                        secure/precis: fix short destination buffer handling in Nickname profile

                        The additional mapping rule for the Nickname profile (RFC 8266) requires
                        collapsing interior sequences of spaces. The Transform implementation
                        was writing an interior space to the destination buffer without first
                        checking if there was enough space for both the space and the next rune.

                        This change ensures that transform.ErrShortDst is returned if the
                        destination buffer is too small, preventing potential out-of-bounds
                        writes or incomplete copies.

                        Thanks to Omkhar Arasaratnam (GitHub: omkhar) for reporting this issue.

                        Fixes CVE-2026-56851
                        Fixes golang/go#80112
                        Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Reviewed-by: Damien Neil <dn...@google.com>
                        Files:
                        • M secure/precis/enforce_test.go
                        • M secure/precis/nickname.go
                        • M secure/precis/profile.go
                        Change size: M
                        Delta: 3 files changed, 177 insertions(+), 56 deletions(-)
                        Branch: refs/heads/master
                        Submit Requirements:
                        Open in Gerrit
                        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                        Gerrit-MessageType: merged
                        Gerrit-Project: text
                        Gerrit-Branch: master
                        Gerrit-Change-Id: I51c8dcc58a5b8fd1002f2cdd832698651db89a15
                        Gerrit-Change-Number: 793360
                        Gerrit-PatchSet: 10
                        Gerrit-Owner: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Damien Neil <dn...@google.com>
                        Gerrit-Reviewer: Ian Alexander <ji...@google.com>
                        Gerrit-Reviewer: Mark Freeman <markf...@google.com>
                        open
                        diffy
                        satisfied_requirement
                        Reply all
                        Reply to author
                        Forward
                        0 new messages