Skip to content

Conversation

@catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/8001

Describe changes: improve stack allocations

  • allocate on the heap if it can be large
  • adds safety checks or debug validation

#14633 without dummy commit and with last commit extended to cover all uses of buffer_type_id

Still todo after : handle other cases of git grep '\];' src/*.c | grep -v = | grep -v '[0-9]\];' | grep -v '[A-Z]\];' | grep -v return | grep -v g_alproto_max | grep -v '\[\];' | grep -v sizeof after src/detect-engine.c

Even if current caller does not provide too big data.

Ticket: 8001
To be able to load 1M signatures and not have a stack overflow

Ticket: 8001
To avoid stack overflow

A single signature should not have more than 65k buffers

Ticket: 8001
buffer_type_id is a u32

Ticket: 8001
@catenacyber catenacyber mentioned this pull request Jan 20, 2026
@catenacyber catenacyber marked this pull request as draft January 20, 2026 20:14
@suricata-qa
Copy link

ERROR:
ERROR: SEGMENTATION FAULT in ASAN_TLPR1_cfg QA test

ERROR: QA failed on ASAN_TLPR1_cfg.

Pipeline = 29200

@catenacyber catenacyber mentioned this pull request Jan 20, 2026
@catenacyber
Copy link
Contributor Author

Next in #14661

@catenacyber catenacyber mentioned this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants