mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
mirror repository of the tor core protocol in case of issues
3adabaf3e9
The buf_read_from_tls() function was designed to read up to a certain number of bytes a TLS socket using read_to_chunk_tls() which boils down to SSL_read() (with OpenSSL, common case). However, at the end of the loop, the returned number of bytes from read_to_chunk_tls() was treated like the syscall read() for which if less bytes than the total asked are returned, it signals EOF. But, with SSL_read(), it returns up to a TLS record which can be less than what was asked. The assumption that it was EOF was wrong which made the while loop exiting before it was able to consume all requested bytes (at_most parameter). The general use case that Tor sees is that it will ask the network layer to give it at most 16KB (that is roughly 32 cells) but because of KIST scheduler, the highest possible TLS record we currently observe is 4096 bytes (4KB or 8 cells). Thus the loop would at best always return 8 cells even though much more could be on the TLS socket. See ticket #40006 for more details. Fixes #40006 Signed-off-by: David Goulet <dgoulet@torproject.org> |
||
---|---|---|
changes | ||
contrib | ||
doc | ||
m4 | ||
scripts | ||
src | ||
.appveyor.yml | ||
.clang-format | ||
.editorconfig | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
.travis.yml | ||
acinclude.m4 | ||
autogen.sh | ||
ChangeLog | ||
CODE_OF_CONDUCT | ||
config.rust.in | ||
configure.ac | ||
CONTRIBUTING | ||
Doxyfile.in | ||
INSTALL | ||
LICENSE | ||
Makefile.am | ||
Makefile.nmake | ||
README | ||
ReleaseNotes | ||
warning_flags.in |
Tor protects your privacy on the internet by hiding the connection between your Internet address and the services you use. We believe Tor is reasonably secure, but please ensure you read the instructions and configure it properly. To build Tor from source: ./configure && make && make install To build Tor from a just-cloned git repository: sh autogen.sh && ./configure && make && make install Home page: https://www.torproject.org/ Download new versions: https://www.torproject.org/download/download.html Documentation, including links to installation and setup instructions: https://www.torproject.org/docs/documentation.html Making applications work with Tor: https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO Frequently Asked Questions: https://www.torproject.org/docs/faq.html Release timeline: https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases To get started working on Tor development: See the doc/HACKING directory.