An issue was discovered in Tor before 0.4.6.5, aka TROVE-2021-003. An attacker can forge RELAY_END or RELAY_RESOLVED to bypass the intended access control for ending a stream.
https://security.gentoo.org/glsa/202107-25
https://gitlab.torproject.org/tpo/core/tor/-/issues/40389
https://blog.torproject.org/node/2041
http://packetstormsecurity.com/files/163510/Tor-Half-Closed-Connection-Stream-Confusion.html