Artifact [3d971a41a9]

Artifact 3d971a41a936f2f26a9757605cedbd93e720a9a1fdaedfa72f4236d21886d678:

Ticket change [3d971a41a9] - New ticket [006bd0c74e0a21fa|006bd0c74e] <i>PATCH: BIO_CTRL_PUSH not handled</i>. by ssteidl on 2022-11-07 02:06:34.
D 2022-11-07T02:06:34.166
J foundin 1.8.0
J icomment BIO_CTRL_PUSH\sis\san\soptional\svalue\sthat\sis\snot\shandled\sin\sthe\stlsBIO:BioCtrl().\s\r\n\r\nThe\slarger\sproblem\sis\sthat\sthe\slibrary\sdoes\snot\ssupport\snew\soptional\scommands\sbecause\sit\sreturns\s-2\sfor\sunknown\scmds\sin\sBioCtrl().\s\sI\swould\ssuggest\schanging\sthe\sdefault\sreturn\svalue\sto\s0.\s\sI\sconfirmed\sthat\sthis\sfixed\sthe\sissue.\s\s\r\n\r\n*tcltls\sversion*:\s1.8.0\s(trunk\sas\sof\stoday)\s\r\n*OS*:\sFreeBSD\s12.3\r\n*Openssl\sversion*:\s1.1.1q\r\n\r\nPatch\r\n=====\r\n\r\n```\r\n---\stlsBIO.c\r\n+++\stlsBIO.c\r\n@@\s-279,11\s+279,11\s@@\r\n\s\t\t\tret\s=\s((Tcl_WriteRaw(chan,\s"",\s0)\s>=\s0)\s?\s1\s:\s-1);\r\n\s\t\t\tdprintf("BIO_CTRL_FLUSH\sreturning\svalue\s%li",\sret);\r\n\s\t\t\tbreak;\r\n\s\t\tdefault:\r\n\s\t\t\tdprintf("Got\sunknown\scontrol\scommand\s(%i)",\scmd);\r\n-\t\t\tret\s=\s-2;\r\n+\s\s\s\s\s\s\s\s\s\s\s\sret\s=\s0;\r\n\s\t\t\tbreak;\r\n\s\t}\r\n\s\r\n\s\treturn(ret);\r\n\s}\r\n\r\n```\r\n\r\nExample\sof\sproblem\r\n==================\r\n```\r\npackage\srequire\stls\s\s\s\r\n./tls.c:1785:Tls_Init():Called\r\n./tls.c:1903:TlsLibInit():Called\r\n./tlsBIO.c:53:BIO_new_tcl():BIO_new_tcl()\scalled\r\n./tlsBIO.c:66:BIO_new_tcl():Asked\sto\ssetup\sa\sNULL\sstate,\sjust\screating\sthe\sinitial\sconfiguration\r\n1.8.0\r\n%\sset\ssock\s[tls::socket\slistener.logz.io\s5052]\r\n./tls.c:759:ImportObjCmd():Called\r\n./tls.c:1093:CTX_Init():Called\r\n./tls.c:925:ImportObjCmd():Consuming\sTcl\schannel\ssock8010d2690\r\n./tls.c:927:ImportObjCmd():Created\schannel\snamed\ssock8010d2690\r\n./tlsIO.c:699:TlsWatchProc():TlsWatchProc(0x0)\r\n./tlsIO.c:708:TlsWatchProc():statePtr->flags=0|TLS_TCL_INIT\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsIO.c:734:TlsWatchProc():Registering\sour\sinterest\sin\sthe\slower\schannel\s(chan=0x80105e050)\r\n./tlsIO.c:699:TlsWatchProc():TlsWatchProc(0x0)\r\n./tlsIO.c:708:TlsWatchProc():statePtr->flags=0|TLS_TCL_INIT\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsIO.c:734:TlsWatchProc():Registering\sour\sinterest\sin\sthe\slower\schannel\s(chan=0x80105e050)\r\n./tlsBIO.c:53:BIO_new_tcl():BIO_new_tcl()\scalled\r\n./tlsBIO.c:292:BioNew():BioNew(0x80092f680)\scalled\r\n./tls.c:991:ImportObjCmd():Returning\ssock8010d2690\r\nsock8010d2690\r\n%\stls::handshake\s$sock\r\n./tls.c:647:HandshakeObjCmd():Called\r\n./tls.c:669:HandshakeObjCmd():Calling\sTls_WaitForConnect\r\n./tlsIO.c:197:Tls_WaitForConnect():WaitForConnect(0x80107c010)\r\n./tlsIO.c:198:Tls_WaitForConnect():statePtr->flags=0|TLS_TCL_INIT\r\n./tlsIO.c:228:Tls_WaitForConnect():Calling\sSSL_connect()\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:229:BioCtrl():BioCtrl(0x80092f680,\s0x6,\s0x0,\s0x80092f780)\r\n./tlsBIO.c:283:BioCtrl():Got\sunknown\scontrol\scommand\s(6)\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:120:BioWrite():[chan=0x80105e050]\sBioWrite(0x80092f680,\s<buf>,\s517)\r\n./tlsBIO.c:127:BioWrite():[chan=0x80105e050]\sBioWrite(517)\s->\s517\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:148:BioWrite():Successfully\swrote\ssome\sdata\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:229:BioCtrl():BioCtrl(0x80092f680,\s0xb,\s0x0,\s0x0)\r\n./tlsBIO.c:278:BioCtrl():Got\sBIO_CTRL_FLUSH\r\n./tlsBIO.c:280:BioCtrl():BIO_CTRL_FLUSH\sreturning\svalue\s1\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s122)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(122)\s->\s122\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s122)\s[0x80105e050]\sreturning\s122\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s1)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(1)\s->\s1\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s1)\s[0x80105e050]\sreturning\s1\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s23)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(23)\s->\s23\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s23)\s[0x80105e050]\sreturning\s23\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5673)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5673)\s->\s5673\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5673)\s[0x80105e050]\sreturning\s5673\r\n./tls.c:180:InfoCallback():Called\r\n./tls.c:283:VerifyCallback():Verify:\s0\r\n./tls.c:283:VerifyCallback():Verify:\s1\r\n./tls.c:283:VerifyCallback():Verify:\s1\r\n./tls.c:283:VerifyCallback():Verify:\s1\r\n./tls.c:283:VerifyCallback():Verify:\s1\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s281)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(281)\s->\s281\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s281)\s[0x80105e050]\sreturning\s281\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s5)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(5)\s->\s5\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s5)\s[0x80105e050]\sreturning\s5\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:169:BioRead():[chan=0x80105e050]\sBioRead(0x80092f680,\s<buf>,\s69)\r\n./tlsBIO.c:180:BioRead():[chan=0x80105e050]\sBioRead(69)\s->\s69\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:201:BioRead():Successfully\sread\ssome\sdata\r\n./tlsBIO.c:212:BioRead():BioRead(0x80092f680,\s<buf>,\s69)\s[0x80105e050]\sreturning\s69\r\n./tls.c:180:InfoCallback():Called\r\n./tls.c:180:InfoCallback():Called\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:120:BioWrite():[chan=0x80105e050]\sBioWrite(0x80092f680,\s<buf>,\s80)\r\n./tlsBIO.c:127:BioWrite():[chan=0x80105e050]\sBioWrite(80)\s->\s80\s[tclEof=0;\stclErrno=0]\r\n./tlsBIO.c:148:BioWrite():Successfully\swrote\ssome\sdata\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:229:BioCtrl():BioCtrl(0x80092f680,\s0xb,\s0x0,\s0x0)\r\n./tlsBIO.c:278:BioCtrl():Got\sBIO_CTRL_FLUSH\r\n./tlsBIO.c:280:BioCtrl():BIO_CTRL_FLUSH\sreturning\svalue\s1\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:229:BioCtrl():BioCtrl(0x80092f680,\s0x7,\s0x0,\s0x80092f780)\r\n./tlsBIO.c:283:BioCtrl():Got\sunknown\scontrol\scommand\s(7)\r\n./tls.c:180:InfoCallback():Called\r\n./tls.c:180:InfoCallback():Called\r\n./tlsIO.c:234:Tls_WaitForConnect():That\sseems\sto\shave\sgone\sokay\r\n./tlsIO.c:972:Tls_GetParent():Requested\sto\sget\sparent\sof\schannel\s0x801085090\r\n./tlsBIO.c:229:BioCtrl():BioCtrl(0x80092f680,\s0xb,\s0x0,\s0x0)\r\n./tlsBIO.c:278:BioCtrl():Got\sBIO_CTRL_FLUSH\r\n./tlsBIO.c:280:BioCtrl():BIO_CTRL_FLUSH\sreturning\svalue\s1\r\n./tlsIO.c:245:Tls_WaitForConnect():Got\serror:\s1\s(rc\s=\s0)\r\n./tlsIO.c:278:Tls_WaitForConnect():We\shave\seither\scompletely\sestablished\sthe\ssession\sor\scompletely\sfailed\sit\s--\sthere\sis\sno\smore\sneed\sto\sever\sretry\sit\sthough\r\n./tlsIO.c:288:Tls_WaitForConnect():The\sconnection\sis\sup\r\n./tlsIO.c:348:Tls_WaitForConnect():Removing\sthe\s"TLS_TCL_INIT"\sflag\ssince\swe\shave\scompleted\sthe\shandshake\r\n./tlsIO.c:351:Tls_WaitForConnect():Returning\sin\ssuccess\r\n./tls.c:671:HandshakeObjCmd():Tls_WaitForConnect\sreturned:\s0\r\n./tls.c:699:HandshakeObjCmd():Returning\sTCL_OK\swith\sdata\s"1"\r\n```
J login ssteidl
J mimetype text/x-markdown
J private_contact dde1eb0bdf6f54ba2c9e6ea72e4617520b3c7b1b
J severity Severe
J status Open
J title PATCH:\sBIO_CTRL_PUSH\snot\shandled
J type Code\sDefect
K 006bd0c74e0a21fad58e6ef5f994f884a11fa741
U ssteidl
Z c84aef34c5cb6e24f71d35178a123d03