You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Security] Allocation size overflow in r_str_word_get0set #26047
This report was generated by AI and manually verified by a human.
Environment
# copypaste this script into your shell and replace it with the output
date
r2 -v
uname -ms
Description
r_str_word_get0set in libr/util/str.c can overflow its signed length calculation and pass an invalid allocation size to malloc.
The harness calls r_str_word_get0set with stralen == INT_MAX and a two-byte replacement string. The function computes a wrapped signed int nlen, then passes nlen + 2 to malloc. ASan reports an allocation-size-too-big diagnostic with a stack frame at libr/util/str.c:452.
The expected behavior is to use checked size arithmetic and reject inputs that would overflow the computed replacement buffer length.
Activity
Fix radareorg#26047 - allocation size overflow in r_str_word_get0set …