{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752665377,
"reponame":"openssl",
"desc":"OpenSSL",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"8cb7c7326649abbf80ed8baae6b0d984",
"commit": {"type":"commit",
"time": 1493115219,
"time_ofs": 60,
"oid_tree": { "oid": "35494eaa6ea061272ae5b91f5de361ab4ce5aa3e", "alias": []},
"oid":{ "oid": "41b3c9ce2a02195aa7cf74c90b80468354ac708d", "alias": []},
"msg": "Fix problem with SCTP close_notify alerts",
"sig_commit": { "git_time": { "time": 1493115219, "offset": 60 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" },
"sig_author": { "git_time": { "time": 1492790166, "offset": 60 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" }},
"body": "Fix problem with SCTP close_notify alerts\n\nIn SCTP the code was only allowing a send of a close_notify alert if the\nsocket is dry. If the socket isn't dry then it was attempting to save away\nthe close_notify alert to resend later when it is dry and then it returned\nsuccess. However because the application then thinks that the close_notify\nalert has been successfully sent it never re-enters the DTLS code to\nactually resend the alert. A much simpler solution is to just fail with a\nretryable error in the event that the socket isn't dry. That way the\napplication knows to retry sending the close_notify alert.\n\nReviewed-by: Richard Levitte \u003clevitte@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/3286)"
,
"diff": "diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c\nindex d3a7b03..7ef4281 100644\n--- a/crypto/bio/bss_dgram.c\n+++ b/crypto/bio/bss_dgram.c\n@@ -135,7 +135,6 @@ typedef struct bio_dgram_sctp_data_st {\n int ccs_sent;\n int save_shutdown;\n int peer_auth_tested;\n- bio_dgram_sctp_save_message saved_message;\n } bio_dgram_sctp_data;\n # endif\n \n@@ -978,10 +977,8 @@ static int dgram_sctp_free(BIO *a)\n return 0;\n \n data \u003d (bio_dgram_sctp_data *) a-\u003eptr;\n- if (data !\u003d NULL) {\n- OPENSSL_free(data-\u003esaved_message.data);\n+ if (data !\u003d NULL)\n OPENSSL_free(data);\n- }\n \n return (1);\n }\n@@ -1083,22 +1080,6 @@ static int dgram_sctp_read(BIO *b, char *out, int outl)\n struct sctp_event_subscribe event;\n socklen_t eventsize;\n # endif\n- /*\n- * If a message has been delayed until the socket is dry,\n- * it can be sent now.\n- */\n- if (data-\u003esaved_message.length \u003e 0) {\n- i \u003d dgram_sctp_write(data-\u003esaved_message.bio,\n- data-\u003esaved_message.data,\n- data-\u003esaved_message.length);\n- if (i \u003c 0) {\n- ret \u003d i;\n- break;\n- }\n- OPENSSL_free(data-\u003esaved_message.data);\n- data-\u003esaved_message.data \u003d NULL;\n- data-\u003esaved_message.length \u003d 0;\n- }\n \n /* disable sender dry event */\n # ifdef SCTP_EVENT\n@@ -1281,27 +1262,15 @@ static int dgram_sctp_write(BIO *b, const char *in, int inl)\n sinfo \u003d \u0026handshake_sinfo;\n }\n \n- /*\n- * If we have to send a shutdown alert message and the socket is not dry\n- * yet, we have to save it and send it as soon as the socket gets dry.\n- */\n+ /* We can only send a shutdown alert if the socket is dry */\n if (data-\u003esave_shutdown) {\n ret \u003d BIO_dgram_sctp_wait_for_dry(b);\n- if (ret \u003c 0) {\n+ if (ret \u003c 0)\n return -1;\n- }\n if (ret \u003d\u003d 0) {\n- char *tmp;\n- data-\u003esaved_message.bio \u003d b;\n- if ((tmp \u003d OPENSSL_malloc(inl)) \u003d\u003d NULL) {\n- BIOerr(BIO_F_DGRAM_SCTP_WRITE, ERR_R_MALLOC_FAILURE);\n- return -1;\n- }\n- OPENSSL_free(data-\u003esaved_message.data);\n- data-\u003esaved_message.data \u003d tmp;\n- memcpy(data-\u003esaved_message.data, in, inl);\n- data-\u003esaved_message.length \u003d inl;\n- return inl;\n+ BIO_clear_retry_flags(b);\n+ BIO_set_retry_write(b);\n+ return -1;\n }\n }\n \n","s":{"c":1752665377,"u": 29060}}
],"g": 30870,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}