The vulnerability is a 'gzip bomb' issue in Tornado's HTTP client and server components. The root cause is the lack of a size limit on the cumulative decompressed data within the _GzipMessageDelegate.data_received method in tornado/http1connection.py. This method would continuously decompress incoming gzipped data chunks without checking the total output size. An attacker could exploit this by sending a small, highly compressed payload that, when decompressed, would exhaust system memory, leading to a denial-of-service attack. The fix, found in commit ff808b33adc52d89a549376a5e3628e92abbc8ff, introduces a check against max_body_size after each decompression operation in _GzipMessageDelegate.data_received. The HTTP1Connection.read_response method was also updated to pass this size limit during the delegate's instantiation. Therefore, _GzipMessageDelegate.data_received is the primary vulnerable function where the memory allocation occurs, and HTTP1Connection.read_response is the function that initiates the vulnerable process.