Our static analysis tool reports a concurrency use-after-free due to race conditions in stream.c#L1865 and stream.c#L1515.
The code snippets are as follows.
static void *ucompthread(void *data)
{
...;
dealloc(data);
uci = &ucthread[i]; // alreadly freed
...;
if (uci->c_type != CTYPE_NONE) {
switch (uci->c_type) {
case CTYPE_LZMA:
ret = lzma_decompress_buf(control, uci); //use site
break;
case CTYPE_LZO:
ret = lzo_decompress_buf(control, uci); //use site
break;
case CTYPE_BZIP2:
ret = bzip2_decompress_buf(control, uci); //use site
break;
case CTYPE_GZIP:
ret = gzip_decompress_buf(control, uci); //use site
break;
case CTYPE_ZPAQ:
ret = zpaq_decompress_buf(control, uci, i); //use site
break;
default:
failure_return(("Dunno wtf decompression type to use!\n"), NULL);
break;
}
}
}
Dear Developers:
Our static analysis tool reports a concurrency use-after-free due to race conditions in stream.c#L1865 and stream.c#L1515.
The code snippets are as follows.
Thank you.