[tor-bugs] #25127 [Core Tor/Tor]: Rust implementation of protover_get_supported_protocols() leaks memory

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 9 00:17:31 UTC 2018


#25127: Rust implementation of protover_get_supported_protocols() leaks memory
----------------------------------+------------------------------------
 Reporter:  nickm                 |          Owner:  isis
     Type:  defect                |         Status:  closed
 Priority:  Medium                |      Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor          |        Version:  Tor: 0.3.2.1-alpha
 Severity:  Normal                |     Resolution:  fixed
 Keywords:  rust, protover, leak  |  Actual Points:
Parent ID:                        |         Points:
 Reviewer:                        |        Sponsor:  SponsorM
----------------------------------+------------------------------------
Changes (by isis):

 * status:  merge_ready => closed
 * resolution:   => fixed


Comment:

 tiny nitpick/note: The code from d8307cb0e99d28daa4011e4e9d94e3f8c56cba23
 and d8307cb0e99d28daa4011e4e9d94e3f8c56cba23 has an `unwrap()` in an FFI
 function, which if it were to `panic!()` [https://doc.rust-lang.org/book
 /first-edition/ffi.html#ffi-and-panics would be UB]. However, the
 `unwrap()` and potential `panic!()` is, I think, the same level of
 "unsafety" as writing `unsafe{}` and making a bug, given that the same
 checks are still in place and we're operating with the same set of
 assumptions.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25127#comment:20>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list