Skip to content

Fix buffer overflow issues in Loop object internal Read_Property function - #1355

Merged
skarg merged 2 commits into
masterfrom
bugfix/loop-object-read-property-internal-buffer-overflow
May 19, 2026
Merged

Fix buffer overflow issues in Loop object internal Read_Property function#1355
skarg merged 2 commits into
masterfrom
bugfix/loop-object-read-property-internal-buffer-overflow

Conversation

@skarg

@skarg skarg commented May 19, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@skarg skarg changed the title Fix buffer overflow issues in Read_Property functions across multiple objects Fix buffer overflow issues in Loop object internal Read_Property function May 19, 2026
@skarg
skarg requested a review from Copilot May 19, 2026 13:47

Copilot AI left a comment

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.

Pull request overview

This PR addresses a buffer overflow risk in the Loop object’s internal referenced-property read path by replacing a small fixed-size APDU buffer with a MAX_APDU-sized buffer when invoking the internal ReadProperty callback.

Changes:

  • Added a MAX_APDU-sized buffer for internal ReadProperty callback usage.
  • Updated Loop_Read_Variable_Reference_Update() to use the new buffer and removed the previous 32-byte local buffer.

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

/* handling for manipulated and reference properties */
static write_property_function Write_Property_Internal_Callback;
static read_property_function Read_Property_Internal_Callback;
static uint8_t Read_Property_Buffer[MAX_APDU];
@skarg
skarg merged commit 811026f into master May 19, 2026
40 checks passed
@skarg
skarg deleted the bugfix/loop-object-read-property-internal-buffer-overflow branch May 19, 2026 14:10
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