Files
yara/tests
jmestwa-coder be24a74f22 bound iterator item count in yr_execute_code (#2216)
The set iterators in yr_execute_code read the enumeration item count from the compiled rules and use it unchecked:
- int_enum sizes the iterator allocation with it and then pops that many values off the stack
- string_set and text_string_set repeat the same pattern
- a .yrc loaded through yr_rules_load can carry a count past the stack depth, so the allocation is undersized and the loop runs off the value stack

Bounded each count against the current stack depth. test-iterators saves `for any i in (1,2,3)`, bumps the stored count from 3 to 255 and scans: ASAN reports an out-of-bounds read in yr_execute_code before the change, clean after.
2026-06-30 20:20:42 +02:00
..
2020-10-08 11:52:55 +02:00
2021-08-24 11:12:16 +02:00
2022-08-26 12:04:32 +02:00
2020-12-24 10:46:09 +01:00
2024-01-15 22:31:18 +01:00
2024-01-15 16:34:12 +01:00