Skip to content

core: harden checks#84

Open
edsiper wants to merge 9 commits into
masterfrom
harden-checks
Open

core: harden checks#84
edsiper wants to merge 9 commits into
masterfrom
harden-checks

Conversation

@edsiper
Copy link
Copy Markdown
Member

@edsiper edsiper commented May 12, 2026

No description provided.

edsiper added 9 commits May 12, 2026 16:03
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
…d malformed payloads

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
NULL guards covering every reachable dereference inside the decoder:

- skip KeyValue entries whose key or value field is NULL (the cfl_kvlist
  inserters for non-string types call strlen(key) unguarded, so a NULL
  key from a hand-crafted payload would crash inside cfl).
- reject NULL string_value, NULL array_value/kvlist_value and bytes
  payloads with len>0 and data==NULL inside AnyValue dispatch.
- reject n>0 with a NULL container pointer at every array boundary:
  resource_spans, scope_spans, spans, attributes, events and links.
- skip individual NULL entries inside arrays/events/links so a single
  malformed entry does not drop the whole batch.
- treat a span with a NULL name as INVALID_PAYLOAD instead of relying
  on ctr_span_create returning NULL (which maps to ALLOCATION_ERROR).

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
…oads

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
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.

1 participant