tdfischer/pto

Application crashes when receiving malformed SSL traffic

Closed this issue · 0 comments

Steps to reproduce:

  1. Start PTO with SSL enabled
  2. Browse to PTO port (in my case port 4242) in a web browser
jonathan@alpha:~/sources/pto$ RUST_BACKTRACE=1 cargo run https://terracrypt.net:8448/_matrix/ 0.0.0.0:4242
     Running `target/debug/pto https://terracrypt.net:8448/_matrix/ 0.0.0.0:4242`
thread '<main>' panicked at 'Could not construct SSL stream: OpenSslErrors([UnknownError { library: "SSL routines", function: "SSL23_GET_CLIENT_HELLO", reason: "http request" }])', ../src/libcore/result.rs:760
stack backtrace:
   1:     0x555e8ec70090 - sys::backtrace::tracing::imp::write::haa19c02b4de52f3bG0t
   2:     0x555e8ec72535 - panicking::log_panic::_<closure>::closure.41218
   3:     0x555e8ec71fb0 - panicking::log_panic::h527fe484e9de8fe1W7x
   4:     0x555e8ec63453 - sys_common::unwind::begin_unwind_inner::h51f64b1a34c60827fTs
   5:     0x555e8ec63b08 - sys_common::unwind::begin_unwind_fmt::h0845853a1913f45blSs
   6:     0x555e8ec6f6f1 - rust_begin_unwind
   7:     0x555e8ec9e98f - panicking::panic_fmt::h3967afc085fe8067LFK
   8:     0x555e8eaec472 - result::_<impl>::expect::expect::h7271253094003167501
                        at ../src/libcore/macros.rs:29
   9:     0x555e8ea8f9e6 - ssl::_<impl>::accept::he6adad5cd8dcc37bKlc
                        at src/ssl.rs:65
  10:     0x555e8ea7ef1c - _<impl>::ready::h8981b5c443da0954ruc
                        at src/main.rs:52
  11:     0x555e8ea9a063 - event_loop::_<impl>::io_event::io_event::h12227826124225292806
                        at /home/jonathan/.cargo/registry/src/github.com-88ac128001ac3a9a/mio-0.5.0/src/event_loop.rs:343
  12:     0x555e8ea99f79 - event_loop::_<impl>::io_process::io_process::h12184720034593398904
                        at /home/jonathan/.cargo/registry/src/github.com-88ac128001ac3a9a/mio-0.5.0/src/event_loop.rs:335
  13:     0x555e8ea98ed0 - event_loop::_<impl>::run_once::run_once::h10747931264466179715
                        at /home/jonathan/.cargo/registry/src/github.com-88ac128001ac3a9a/mio-0.5.0/src/event_loop.rs:298
  14:     0x555e8ea9885c - event_loop::_<impl>::run::run::h15564346956025969236
                        at /home/jonathan/.cargo/registry/src/github.com-88ac128001ac3a9a/mio-0.5.0/src/event_loop.rs:247
  15:     0x555e8ea8ad1d - main::hb26fb1b69a6742d0cwc
                        at src/main.rs:101
  16:     0x555e8ec71d54 - sys_common::unwind::try::try_fn::h11901883998771707766
  17:     0x555e8ec6f538 - __rust_try
  18:     0x555e8ec719f6 - rt::lang_start::hc150f651dd2af18b44x
  19:     0x555e8ea9bd59 - main
  20:     0x7f1db760dec4 - __libc_start_main
  21:     0x555e8ea7edc8 - <unknown>
  22:                0x0 - <unknown>
Process didn't exit successfully: `target/debug/pto https://terracrypt.net:8448/_matrix/ 0.0.0.0:4242` (exit code: 101)