aboutsummaryrefslogtreecommitdiff
path: root/src/or/buffers.c
Commit message (Collapse)AuthorAge
* Fix socks5 handshake for username/password authRoger Dingledine2013-05-15
| | | | | The fix for bug 8117 exposed this bug, and it turns out real-world applications like Pidgin do care. Bugfix on 0.2.3.2-alpha; fixes bug 8879.
* Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson2013-05-09
|\
| * Don't run off the end of the array-of-freelistsNick Mathewson2013-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for bug 8844, where eugenis correctly notes that there's a sentinel value at the end of the list-of-freelists that's never actually checked. It's a bug since the first version of the chunked buffer code back in 0.2.0.16-alpha. This would probably be a crash bug if it ever happens, but nobody's ever reported something like this, so I'm unsure whether it can occur. It would require write_to_buf, write_to_buf_zlib, read_to_buf, or read_to_buf_tls to get an input size of more than 32K. Still, it's a good idea to fix this kind of thing!
* | Merge remote-tracking branch 'public/bug8117_023' into maint-0.2.4Nick Mathewson2013-04-11
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: doc/tor.1.txt src/or/config.c src/or/connection.c
| * | Per-SOCKSPort configuration for bug 8117 fix.Nick Mathewson2013-03-20
| | | | | | | | | | | | | | | | | | This might be necessary if the bug8117 fix confuses any applications. Also add a changes file.
| * | Prefer SOCKS_USER_PASS over SOCKS_NO_AUTHNick Mathewson2013-03-20
| |/
* | Fix a bug that roger found in the wide_circ_id codeNick Mathewson2013-02-15
| |
* | Merge remote-tracking branch 'public/wide_circ_ids'Nick Mathewson2013-02-15
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: src/or/channel.h src/or/connection_or.c src/or/cpuworker.c
| * | Replace magic constants for wide_circ_ids with inline function callsNick Mathewson2013-02-09
| | |
| * | Allow a v4 link protocol for 4-byte circuit IDs.Nick Mathewson2012-11-06
| | | | | | | | | | | | | | | | | | Implements proposal 214. Needs testing.
* | | Merge remote-tracking branch 'public/easy_ratelim'Nick Mathewson2013-02-07
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/or/connection.c
| * | | Use log_fn_ratelim in a few places.Nick Mathewson2012-12-26
| | | |
* | | | Rename log() to tor_log() for loggingNick Mathewson2013-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is meant to avoid conflict with the built-in log() function in math.h. It resolves ticket 7599. First reported by dhill. This was generated with the following perl script: #!/usr/bin/perl -w -i -p s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g; s/\blog\(/tor_log\(/g;
* | | | Update the copyright date to 201.Nick Mathewson2013-01-16
|/ / /
* | | Move address map into its own file.Nick Mathewson2012-11-14
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-11-08
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: src/common/crypto.c src/or/rendservice.c
| * Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson2012-11-08
| | | | | | | | | | | | | | | | | | | | Apparently some compilers like to eliminate memset() operations on data that's about to go out-of-scope. I've gone with the safest possible replacement, which might be a bit slow. I don't think this is critical path in any way that will affect performance, but if it is, we can work on that in 0.2.4. Fixes bug 7352.
* | Remove tor_malloc_roundup().Nick Mathewson2012-08-13
|/ | | | | This function never actually did us any good, and it added a little complexity. See the changes file for more info.
* Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson2012-06-15
|
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson2012-06-04
| | | | | | | | Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together.
* MSVC build issue: we use INLINE as the one that will magically workNick Mathewson2012-05-14
|
* Add a check_no_tls_errors() to read_to_buf_tlsArturo Filastò2012-04-24
| | | | | | | | | Fixes bug #4528 "read_to_buf_tls(): Inconsistency in code". This check was added back in 0.1.0.3-rc, but somehow we forgot to leave it in when we refactored read_to_buf_tls in 0.1.0.5-rc. (patch by Arturo; commit message and changes file by nickm)
* Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
* Use SOCKET_OK macros in even more placesNick Mathewson2012-01-17
| | | | | | Add a TOR_INVALID_SOCKET macro to wrap -1/INVALID_SOCKET. Partial work for bug4533.
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-12-15
|\
| * Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-12-15
| |\
| | * Add a fix for the buf_pullup bug that Vektor reportedNick Mathewson2011-12-15
| | |
* | | Fix a bunch of whitespace errorsNick Mathewson2011-10-11
| | |
* | | Cell types and states for new OR handshakeNick Mathewson2011-10-10
| | | | | | | | | | | | | | | | | | Also, define all commands > 128 as variable-length when using v3 or later link protocol. Running into a var cell with an unrecognized type is no longer a bug.
* | | Rephrase the log messages emitted if the TestSocks check is positiveFabian Keil2011-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Tor would always claim to have been given a hostname by the client, while actually only verifying that the client is using SOCKS4A or SOCKS5 with hostnames. Both protocol versions allow IP addresses, too, in which case the log messages were wrong. Fixes #4094.
* | | Remove warning about a loop parsing evbuffer socksNick Mathewson2011-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior is normal when we want more data than the evbuffer actually has for us. We'll ask for (say) 7 bytes, get only 5 (because that's all there is), try to parse the 5 bytes, and get told "no, I want 7". One option would be to bail out early whenever want_length is > buflen, but sometimes we use an over-large want_length. So instead, let's just remove the warning here: it's not a bug after all.
* | | Appease "make check-spaces"Nick Mathewson2011-08-18
| | |
* | | Use evbuffer_copyout() in inspect_evbuffer().Nick Mathewson2011-08-17
| | |
* | | Clear socks auth fields before freeNick Mathewson2011-08-05
| | |
* | | Merge branch 'optimistic-client'Nick Mathewson2011-07-20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conflicts are with the proposal 171 circuit isolation code, and they're all trivial: they're just a matter of both branches adding some unrelated code in the same places. Conflicts: src/or/circuituse.c src/or/connection.c
| * | | Add a generic_buffer_t to use the best buffer type we have on handNick Mathewson2011-07-18
| | | | | | | | | | | | | | | | | | | | Also add a quick function to copy all the data in a buffer. (This one could be done much better, but let's see if it matters.)
* | | | Fix spurious warning in bufferevent socks parsingNick Mathewson2011-07-19
|/ / / | | | | | | | | | | | | | | | | | | | | | The problem was that we weren't initializing want_length to 0 before calling parse_socks() the first time, so it looked like we were risking an infinite loop when in fact we were safe. Fixes 3615; bugfix on 0.2.3.2-alpha.
* | | Merge remote-tracking branch 'public/bug1666'Nick Mathewson2011-07-13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/spec/socks-extensions.txt src/or/buffers.c src/or/config.c src/or/connection_edge.c
| * | | Add more error checks to socks parsing codeNick Mathewson2011-07-12
| | | | | | | | | | | | | | | | | | | | Suggested by Linus to avoid uninitialized reads or infinite loops if it turns out our code is buggier than we had thought.
| * | | Refactor fetch_from_buf_socks() to be greedyNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, fetch_from_buf_socks() might return 0 if there was still data on the buffer and a subsequent call to fetch_from_buf_socks() would return 1. This was making some of the socks5 unit tests harder to write, and could potentially have caused misbehavior with some overly verbose SOCKS implementations. Now, fetch_from_buf_socks() does as much processing as it can, and returns 0 only if it really needs more data. This brings it into line with the evbuffer socks implementation.
| * | | Don't drain extra data when parsing socks auth methodsNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We added this back in 0649fa14 in 2006, to deal with the case where the client unconditionally sent us authentication data. Hopefully, that's not needed any longer, since we now can actually parse authentication data.
| * | | Record username/password data in socks_request_tNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | This change also requires us to add and use a pair of allocator/deallocator functions for socks_request_t, instead of using tor_malloc_zero/tor_free directly.
| * | | If we negotiate authentication, require it.Nick Mathewson2011-06-29
| | | |
| * | | Be more strict about when to accept socks auth messageNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the code as it stood, we would accept any number of socks5 username/password authentication messages, regardless of whether we had actually negotiated username/password authentication. Instead, we should only accept one, and only if we have really negotiated username/password authentication. This patch also makes some fields of socks_request_t into uint8_t, for safety.
| * | | Fix 'make check-spaces'Nick Mathewson2011-06-29
| | | |
| * | | Correct byte-counting in socks auth parsing codeNick Mathewson2011-06-29
| | | |
| * | | bug1666 - Pass-through support for SOCKS5 authentication(4)Robert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | Implement nickm's suggestion that we tolerate SOCKS5 clients that send authentication credentials and SOCKS commands all in one go.
| * | | bug1666 - Pass-through support for SOCKS5 authentication (2)Robert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Address Nick's comments: - Refactor against changes in buffers.c - Ensure we have negotiated a method before accepting authentication credentials
| * | | bug1666 - Pass-through support for SOCKS5 authenticationRobert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a SOCKS5 client insists on authentication, allow it to negotiate a connection with Tor's SOCKS server successfully. Any credentials the client provides are ignored. This allows Tor to work with SOCKS5 clients that can only support 'authenticated' connections. Also add a bunch of basic unit tests for SOCKS4/4a/5 support in buffers.c.