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
[C++][Gandiva] Out-of-bounds read when formatting invalid date/timestamp error messages #50440
input is a Gandiva string given as pointer + length; it is not NUL-terminated (string values are stored contiguously in the Arrow values buffer). The %s conversion scans input for a NUL terminator, so it reads past the length bytes and, for the last value in a buffer, past the buffer end.
It is reached from castDATE_utf8 / castTIMESTAMP_utf8 (i.e. CAST(str AS DATE/TIMESTAMP)) whenever the input is not a valid date/timestamp, which is fully attacker-controlled.
Every other error formatter in the precompiled sources uses the bounded %.*s form with the explicit length. Using it here fixes the over-read.
Activity
apacheGH-50440: [C++][Gandiva] cover timestamp and time cast error paths
GH-50440: [C++][Gandiva] Fix out-of-bounds read in set_error_for_date (…
kou commentedon Oct 1, 2026
Issue resolved by pull request 50441
#50441