grpc/include/grpc++/impl
Harvey Tuch 5f3cfe960f Fix read from uninitialized memory bug in GrpcBufferWriter.
This commit fixes an issue in which the following sequence of operations
leads to use of uninitialized memory:

1. Caller invokes GrpcBufferWriter::Next(), and then makes use of 8191
   bytes in the returned buffer (which is 8192 bytes in size).

2. Caller then returns the unused single byte via
   GrpcBufferWriter::BackUp(). This method invokes
   g_core_codegen_interface->grpc_slice_split_tail(), which causes
   backup_slice_ to be a grpc_slice with one byte.

3. At the next invocation of GrpcBufferWriter::Next(), a reference to
   the single byte grpc_slice is returned to the caller.

The problem here is that the returned reference is to the inlined buffer
in the grpc_slice, which is resident in slice_, not the location of the
buffer inside slice_buffer_ after
g_core_codegen_interface->grpc_slice_buffer_add() in
GrpcBufferWriter::Next(). As a result, any data the caller writes to the
returned void* data is lost.

The solution is to avoid inlined backup slices.
2017-02-07 15:45:44 -05:00
..
codegen Fix read from uninitialized memory bug in GrpcBufferWriter. 2017-02-07 15:45:44 -05:00
README.md add a README for include/grpc++/impl 2015-08-18 12:56:58 -07:00
call.h Update copyrights 2016-03-31 07:46:18 -07:00
client_unary_call.h Update copyrights 2016-03-31 07:46:18 -07:00
grpc_library.h Use C++11 final and override 2016-11-01 16:31:56 -07:00
method_handler_impl.h Update copyrights 2016-03-31 07:46:18 -07:00
rpc_method.h Update copyrights 2016-03-31 07:46:18 -07:00
rpc_service_method.h DONE!!1one 2016-01-27 19:21:12 -08:00
serialization_traits.h Update copyrights 2016-03-31 07:46:18 -07:00
server_builder_option.h Manual clang-format 2016-06-13 09:56:26 -07:00
server_builder_plugin.h Add ServerBuilderPlugin::UpdateChannelArguments 2016-08-29 18:19:03 -07:00
server_initializer.h Server builder plugin 2016-04-29 13:05:36 -07:00
service_type.h Update copyrights 2016-03-31 07:46:18 -07:00
sync_cxx11.h Update copyrights 2016-03-31 07:46:18 -07:00
sync_no_cxx11.h Update copyrights 2016-03-31 07:46:18 -07:00

README.md

The APIs in this directory are not stable!

This directory contains header files that need to be installed but are not part of the public API. Users should not use these headers directly.