Skip to content

Conversation

@klaatu01
Copy link
Contributor

@klaatu01 klaatu01 commented Feb 9, 2026

Still seeing ocassional issues even after #412
During further investigation of the Token Auth supplier crash when the runtime is handling AuthChallenges, we found a potential off-by-one buffer overflow in the token allocation code.

strcpy copies the terminating \0, but the buffer is allocated using size(), which does not include space for it, resulting in an off-by-one write.

@lhotari lhotari requested a review from Copilot February 11, 2026 09:19
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a potential off-by-one buffer overflow in the native token supplier implementation used by token-based authentication, addressing a crash observed during auth challenge handling.

Changes:

  • Allocate one extra byte for the terminating \0 before copying the token via strcpy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants