Skip to content

[c] reject negative size in avro_schema_fixed_ns#3891

Open
arib06 wants to merge 1 commit into
apache:mainfrom
arib06:c-fixed-negative-size
Open

[c] reject negative size in avro_schema_fixed_ns#3891
arib06 wants to merge 1 commit into
apache:mainfrom
arib06:c-fixed-negative-size

Conversation

@arib06

@arib06 arib06 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

validate the fixed size in avro_schema_fixed_ns and reject negatives, otherwise a fixed type from untrusted schema json (e.g. size -2) reaches avro_generic_value_new as a near-SIZE_MAX instance size whose refcount allocation wraps to a couple of bytes and the refcount init writes past it (asan heap-buffer-overflow at generic.c:71); the c++ compiler already rejects size <= 0.

@github-actions github-actions Bot added the C label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant