SABITHSAHEB opened a new pull request, #13968: URL: https://github.com/apache/trafficserver/pull/13968
1. TSRemapDoRemap rebuilds the request query without the `start` argument into a 1024-byte stack buffer, then hands snprintf's return value to TSUrlHttpQuerySet as the copy length. 2. snprintf returns the length it would have written, so a reassembled query longer than 1024 bytes yields a length past the buffer, and the copy (URLPartSet then set_query with copy=true) reads out of bounds into the forwarded URL and the cache key. Return TSREMAP_NO_REMAP when snprintf reports truncation or error, so an oversize query is left unmodified instead of copied past the buffer. The query is attacker-controlled and bounded only by proxy.config.http.request_header_max_size (32768 by default), so this is reachable pre-origin from any client. Repro: GET a `.mp4` whose query carries a non-zero start followed by filler, e.g. `start=1&` plus ~2000 bytes. Under ASan the unpatched path reports a stack-buffer-overflow READ of 2000 bytes past the 1024-byte buffer at the TSUrlHttpQuerySet copy; with the guard it bails before the copy. The mp4 target builds clean with -Werror on the CI Fedora toolchain. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
