Theoretical integer overflow in StringArrayBuilder
/ LargeStringArrayBuilder
#13796
Labels
enhancement
New feature or request
Is your feature request related to a problem or challenge?
Similarly to #13759, we found another potential code vulnerability from a security audit performed by InfluxData
I analyzed the potential risk, and I agree there is a risk of memory unsafety but I do not think it is exploitable via DataFusion APIs. Specifically, the only callsites are:
datafusion/datafusion/functions/src/string/concat_ws.rs
Lines 228 to 229 in 3ee9b3d
The argument is taken from
datafusion/datafusion/functions/src/string/concat_ws.rs
Lines 149 to 150 in 3ee9b3d
So to trigger this code you would have to provide an input record batch with more than
u32::MAX
rowsReproducer showing segfault:
Here is a test case I wrote:
It must be run in release mode
cargo test --release -p datafusion-functions --lib -- overflow
Describe the solution you'd like
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: