chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.86k stars 1.21k forks source link

Fortify scan - buffer overflow - Boost version 1.63 #735

Open ghost opened 3 years ago

ghost commented 3 years ago

@TejasSonawan commented on Oct 31, 2018, 3:44 PM UTC:

Hello Team,

We are using Boost 1.63 lib in our project and when we are doing static scan using Fortify tool, It showing buffer overflow error on the file "Boost/asio/detail/win_fd_set_adapter.hpp" on line 66.

Below is code snippet:

bool set(socket_type descriptor) { for (u_int i = 0; i < fdset->fd_count; ++i) if (fdset->fd_array[i] == descriptor) return true;

reserve(fd_set_->fd_count + 1);
fd_set_->fd_array[fd_set_->fd_count++] = descriptor;
return true;

}

issue for "fdset->fd_array[fdset->fd_count++] = descriptor;" line.

are these errors already fixed in a recent version or are you planning to fix them in a future version ?

Thanks, -Tejas

This issue was moved by chriskohlhoff from boostorg/asio#308.

ghost commented 3 years ago

@swatanabe commented on Oct 31, 2018, 4:09 PM UTC:

ghost commented 3 years ago

@mclow commented on Oct 31, 2018, 4:10 PM UTC:

The place to file bugs against ASIO is http://github.com/boostorg/asio

ghost commented 3 years ago

@TejasSonawan commented on Oct 31, 2018, 5:08 PM UTC:

Thanks for your reply, This is just an example, there are other issue reported Fortify for boost. i have not mentioned them all.