[Boost-bugs] [Boost C++ Libraries] #9122: Reading and writing from/to the windows::stream_handle will cause blind stack writes

Subject: [Boost-bugs] [Boost C++ Libraries] #9122: Reading and writing from/to the windows::stream_handle will cause blind stack writes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-16 22:21:21


#9122: Reading and writing from/to the windows::stream_handle will cause blind
stack writes
----------------------------------------------+----------------------------
 Reporter: smueller@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.53.0 | Severity: Showstopper
 Keywords: asio crash stream_handle windows |
----------------------------------------------+----------------------------
 ReadFile and WriteFile are being called with LPOVERLAPPED arguments. The
 handle involved is attached to an iocompletionport so the I/O calls are
 handled asynchronously. The parameters that receive the number of bytes
 received and sent in the start_read_op and start_write_op functions
 respectively must be NULL if the operation is to be completed
 asynchronously.

 The problem is that the parameters are not set to NULL, and are set to
 locations on the stack adjacent to the I/O call. This results in writing
 the number of bytes sent or received into that location sometime after the
 call was made. The stack involved in that operation may be off doing other
 things, hence the blind write.

 This problem exists in 1.54 as well.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9122>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC