Skip to content

plugins types BUGFIX ipv4-prefix canonical print buffer overflow - #2617

Merged
michalvasko merged 1 commit into
CESNET:develfrom
affan-arch:ipv4-prefix-print-buffer
Nov 3, 2026
Merged

michalvasko merged 1 commit into
CESNET:develfrom
affan-arch:ipv4-prefix-print-buffer

Conversation

@affan-arch

Copy link
Copy Markdown

the ipv4-prefix printer allocated INET_ADDRSTRLEN + 3 bytes for the canonical value, enough only for a two-digit prefix, so once a store-only parse lets a three-digit prefix like 255.255.255.255/255 through (the pattern capping it at 32 is skipped) the trailing sprintf("/255") writes one byte past the buffer; sized it to INET_ADDRSTRLEN + 4 like the ipv6-prefix printer already does, and added a store-only regression in inet_types that fails under asan without the fix.

@michalvasko
michalvasko changed the base branch from master to devel November 3, 2026 10:32

@michalvasko michalvasko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine, but I have changed the base branch to devel.

@michalvasko
michalvasko merged commit 362f2e4 into CESNET:devel Nov 3, 2026
13 checks passed
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