painless-security / trust-router

Moonshot Trust Router
0 stars 0 forks source link

SIGSEGV in libtr_tid.so.2 when trustrouter hostname does not resolve #15

Open jennifer-richards opened 6 years ago

jennifer-richards commented 6 years ago

Debian 7 official moonshot-trustrouter packages. Used from FR.

How to reproduce: although it happened to me used from FR, it can be easily reproducible if you just try to execute "tidc" using a invalid (such as "nevermind").

Example:

tidc nevermind um.es jisc.net jisc2-t3-apc.lxc
TIDC Client:
Server = nevermind, rp_realm = um.es, target_realm = jisc.net, community = jisc2-t3-apc.lxc, port = 12309
Warning: dh_check failed with 8
: the g value is not a generator
Segmentation fault (core dumped)

Backtrace:

#0  gsscon_connect (inHost=inHost@entry=0x7fffffffeecd "nevermind", inPort=inPort@entry=12309, inServiceName=inServiceName@entry=0x7ffff7bd94d7 "trustidentity", outFD=outFD@entry=0x7fffffffeb6c, 
    outGSSContext=outGSSContext@entry=0x7fffffffeba8) at gsscon_active.c:92
        err = <optimized out>
        fd = -1
        majorStatus = <optimized out>
        minorStatus = 0
        minorStatusToo = 0
        hp = <optimized out>
        saddr = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "`0`\000\000\000\000"}
        serviceName = 0x0
        clientName = 0x0
        clientCredentials = 0x0
        gssContext = 0x0
        actualFlags = 0
        inputTokenBuffer = 0x0
        inputTokenBufferLength = 0
        inputToken = {length = 140737488350950, value = 0x3015}
        nameBuffer = {length = 0, value = 0x7ffff7dea9c2}
        inputTokenPtr = 0x0
        name = <optimized out>
        EAP_OID = {length = 1, elements = 0x0}
#1  0x00007ffff7bd45fd in tidc_open_connection (tidc=tidc@entry=0x603060, server=server@entry=0x7fffffffeecd "nevermind", port=port@entry=12309, gssctx=gssctx@entry=0x7fffffffeba8) at tid/tidc.c:77
        err = 0
        conn = -1
        use_port = 12309
#2  0x0000000000400c94 in main (argc=<optimized out>, argv=<optimized out>) at tid/example/tidc_main.c:136
        tidc = 0x603060
        server = 0x7fffffffeecd "nevermind"
        rp_realm = 0x7fffffffeed7 "um.es"
        realm = 0x7fffffffeedd "jisc.net"
        coi = 0x7fffffffeee6 "jisc2-t3-apc.lxc"
        port = 12309
        conn = 0
        rc = <optimized out>
        gssctx = <optimized out>

Launchpad Details: #LP1691230 Alejandro Perez - 2017-05-16 18:30:35 +0000

alejandro-perez commented 6 years ago

Could not reproduce. Seems fixed.