kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
September 2015
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
37 participants
387 discussions
Start a n
N
ew thread
git:master:bce9cf97: janssonrpc-c: Fix double free if retry timer add fails
by Chris Double
Module: kamailio Branch: master Commit: bce9cf97646153af6abcf9f43cbb72f2c734e490 URL:
https://github.com/kamailio/kamailio/commit/bce9cf97646153af6abcf9f43cbb72f…
Author: Chris Double <chris.double(a)double.co.nz> Committer: Chris Double <chris.double(a)double.co.nz> Date: 2015-09-24T10:58:52+12:00 janssonrpc-c: Fix double free if retry timer add fails - Fix double free if schedule_retry fails when adding request retry timer. timeout_cb called fail_request which frees req after schedule_retry had already done so. --- Modified: modules/janssonrpc-c/janssonrpc_request.c --- Diff:
https://github.com/kamailio/kamailio/commit/bce9cf97646153af6abcf9f43cbb72f…
Patch:
https://github.com/kamailio/kamailio/commit/bce9cf97646153af6abcf9f43cbb72f…
--- diff --git a/modules/janssonrpc-c/janssonrpc_request.c b/modules/janssonrpc-c/janssonrpc_request.c index 39c7f31..f0117d9 100644 --- a/modules/janssonrpc-c/janssonrpc_request.c +++ b/modules/janssonrpc-c/janssonrpc_request.c @@ -253,8 +253,6 @@ int schedule_retry(jsonrpc_request_t* req) new_req->ntries = req->ntries; - free_request(req); - const struct timeval tv = ms_to_tv(time); new_req->retry_ev = evtimer_new(global_ev_base, retry_cb, (void*)new_req); @@ -264,6 +262,8 @@ int schedule_retry(jsonrpc_request_t* req) goto error; } + free_request(req); + return 0; error: ERR("schedule_retry failed.\n");
9 years, 2 months
1
0
0
0
[kamailio] janssonrpc-c: Fix double free if retry timer add fails (#343)
by Chris Double
- Fix double free if schedule_retry fails when adding request retry timer. timeout_cb called fail_request which frees req after schedule_retry had already done so. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/343
-- Commit Summary -- * janssonrpc-c: Fix double free if retry timer add fails -- File Changes -- M modules/janssonrpc-c/janssonrpc_request.c (4) -- Patch Links --
https://github.com/kamailio/kamailio/pull/343.patch
https://github.com/kamailio/kamailio/pull/343.diff
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/343
9 years, 2 months
2
1
0
0
git:master:b2ef89bc: Merge pull request #342 from doublec/janssonrpc_read_after_free
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: b2ef89bc55ae9b7bc816178e3c601289f6de3216 URL:
https://github.com/kamailio/kamailio/commit/b2ef89bc55ae9b7bc816178e3c60128…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-24T08:51:26+02:00 Merge pull request #342 from doublec/janssonrpc_read_after_free janssonrpc-c: Fix use after free --- Modified: modules/janssonrpc-c/janssonrpc_connect.c Modified: modules/janssonrpc-c/janssonrpc_server.c --- Diff:
https://github.com/kamailio/kamailio/commit/b2ef89bc55ae9b7bc816178e3c60128…
Patch:
https://github.com/kamailio/kamailio/commit/b2ef89bc55ae9b7bc816178e3c60128…
--- diff --git a/modules/janssonrpc-c/janssonrpc_connect.c b/modules/janssonrpc-c/janssonrpc_connect.c index bfe66c9..76378d3 100644 --- a/modules/janssonrpc-c/janssonrpc_connect.c +++ b/modules/janssonrpc-c/janssonrpc_connect.c @@ -88,9 +88,13 @@ void force_disconnect(jsonrpc_server_t* server) /* clean out requests */ jsonrpc_request_t* req = NULL; + jsonrpc_request_t* next = NULL; int key = 0; for (key=0; key < JSONRPC_DEFAULT_HTABLE_SIZE; key++) { - for (req = request_table[key]; req != NULL; req = req->next) { + for (req = request_table[key]; req != NULL; req = next) { + /* fail_request frees req so need to store + next_req before call */ + next = req->next; if(req->server != NULL && req->server == server) { fail_request(JRPC_ERR_SERVER_DISCONNECT, req, "Failing request for server shutdown"); @@ -128,9 +132,10 @@ void server_backoff_cb(int fd, short event, void *arg) close(fd); CHECK_AND_FREE_EV(a->ev); - pkg_free(arg); wait_server_backoff(timeout, a->server, false); + + pkg_free(arg); } void wait_server_backoff(unsigned int timeout /* seconds */, diff --git a/modules/janssonrpc-c/janssonrpc_server.c b/modules/janssonrpc-c/janssonrpc_server.c index 09286bc..8f1fb06 100644 --- a/modules/janssonrpc-c/janssonrpc_server.c +++ b/modules/janssonrpc-c/janssonrpc_server.c @@ -591,8 +591,10 @@ void free_server_list(server_list_t* list) return; server_list_t* node = NULL; - for(node=list; node!=NULL; node=node->next) + server_list_t* next = NULL; + for(node=list; node!=NULL; node=next) { + next = node->next; pkg_free(node); } }
9 years, 2 months
1
0
0
0
git:master:a53b2fb6: janssonrpc-c: Fix use after free
by Chris Double
Module: kamailio Branch: master Commit: a53b2fb68d555b07be479e41895937ae1c6318f6 URL:
https://github.com/kamailio/kamailio/commit/a53b2fb68d555b07be479e41895937a…
Author: Chris Double <chris.double(a)double.co.nz> Committer: Chris Double <chris.double(a)double.co.nz> Date: 2015-09-24T11:19:11+12:00 janssonrpc-c: Fix use after free - Fix use after free due to pointer aliasing of 'arg' and 'a' in server_backoff_cb. - Fix use after free in force_disconnect - Fix use after free in free_server_list --- Modified: modules/janssonrpc-c/janssonrpc_connect.c Modified: modules/janssonrpc-c/janssonrpc_server.c --- Diff:
https://github.com/kamailio/kamailio/commit/a53b2fb68d555b07be479e41895937a…
Patch:
https://github.com/kamailio/kamailio/commit/a53b2fb68d555b07be479e41895937a…
--- diff --git a/modules/janssonrpc-c/janssonrpc_connect.c b/modules/janssonrpc-c/janssonrpc_connect.c index bfe66c9..76378d3 100644 --- a/modules/janssonrpc-c/janssonrpc_connect.c +++ b/modules/janssonrpc-c/janssonrpc_connect.c @@ -88,9 +88,13 @@ void force_disconnect(jsonrpc_server_t* server) /* clean out requests */ jsonrpc_request_t* req = NULL; + jsonrpc_request_t* next = NULL; int key = 0; for (key=0; key < JSONRPC_DEFAULT_HTABLE_SIZE; key++) { - for (req = request_table[key]; req != NULL; req = req->next) { + for (req = request_table[key]; req != NULL; req = next) { + /* fail_request frees req so need to store + next_req before call */ + next = req->next; if(req->server != NULL && req->server == server) { fail_request(JRPC_ERR_SERVER_DISCONNECT, req, "Failing request for server shutdown"); @@ -128,9 +132,10 @@ void server_backoff_cb(int fd, short event, void *arg) close(fd); CHECK_AND_FREE_EV(a->ev); - pkg_free(arg); wait_server_backoff(timeout, a->server, false); + + pkg_free(arg); } void wait_server_backoff(unsigned int timeout /* seconds */, diff --git a/modules/janssonrpc-c/janssonrpc_server.c b/modules/janssonrpc-c/janssonrpc_server.c index 09286bc..8f1fb06 100644 --- a/modules/janssonrpc-c/janssonrpc_server.c +++ b/modules/janssonrpc-c/janssonrpc_server.c @@ -591,8 +591,10 @@ void free_server_list(server_list_t* list) return; server_list_t* node = NULL; - for(node=list; node!=NULL; node=node->next) + server_list_t* next = NULL; + for(node=list; node!=NULL; node=next) { + next = node->next; pkg_free(node); } }
9 years, 2 months
1
0
0
0
[kamailio] janssonrpc-c: Fix use after free (#342)
by Chris Double
- Fix use after free due to pointer aliasing of 'arg' and 'a' in server_backoff_cb. - Fix use after free in force_disconnect - Fix use after free in free_server_list You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/342
-- Commit Summary -- * janssonrpc-c: Fix use after free -- File Changes -- M modules/janssonrpc-c/janssonrpc_connect.c (9) M modules/janssonrpc-c/janssonrpc_server.c (4) -- Patch Links --
https://github.com/kamailio/kamailio/pull/342.patch
https://github.com/kamailio/kamailio/pull/342.diff
--- Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/342
9 years, 2 months
2
1
0
0
git:master:64914118: tm: reset next/prev fields when unlinking transaction from hash table
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 649141185f231435bbe03fd13fe5a0e65b9fed04 URL:
https://github.com/kamailio/kamailio/commit/649141185f231435bbe03fd13fe5a0e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-23T22:53:01+02:00 tm: reset next/prev fields when unlinking transaction from hash table --- Modified: modules/tm/h_table.h --- Diff:
https://github.com/kamailio/kamailio/commit/649141185f231435bbe03fd13fe5a0e…
Patch:
https://github.com/kamailio/kamailio/commit/649141185f231435bbe03fd13fe5a0e…
--- diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h index 9340e5b..7cda34e 100644 --- a/modules/tm/h_table.h +++ b/modules/tm/h_table.h @@ -590,6 +590,8 @@ inline static void insert_into_hash_table_unsafe( struct cell * p_cell, inline static void remove_from_hash_table_unsafe( struct cell * p_cell) { clist_rm(p_cell, next_c, prev_c); + p_cell->next_c = 0; + p_cell->prev_c = 0; # ifdef EXTRA_DEBUG #ifdef TM_HASH_STATS if (_tm_table->entries[p_cell->hash_index].cur_entries==0){
9 years, 2 months
1
0
0
0
git:master:92ff4854: tm: warn troubleshooting message for deleted transaction turned in dbg
by Daniel-Constantin Mierla
Module: kamailio Branch: master Commit: 92ff485409611ad345b14b784afb1be25fa188b9 URL:
https://github.com/kamailio/kamailio/commit/92ff485409611ad345b14b784afb1be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: 2015-09-23T18:03:53+02:00 tm: warn troubleshooting message for deleted transaction turned in dbg --- Modified: modules/tm/h_table.c --- Diff:
https://github.com/kamailio/kamailio/commit/92ff485409611ad345b14b784afb1be…
Patch:
https://github.com/kamailio/kamailio/commit/92ff485409611ad345b14b784afb1be…
--- diff --git a/modules/tm/h_table.c b/modules/tm/h_table.c index c38885a..b603e99 100644 --- a/modules/tm/h_table.c +++ b/modules/tm/h_table.c @@ -123,7 +123,7 @@ void free_cell_helper( struct cell* dead_cell, const char *fname, unsigned int f struct totag_elem *tt, *foo; struct tm_callback *cbs, *cbs_tmp; - LM_WARN("===== freeing transaction %p from %s:%u\n", dead_cell, fname, fline); + LM_DBG("freeing transaction %p from %s:%u\n", dead_cell, fname, fline); release_cell_lock( dead_cell ); if (unlikely(has_tran_tmcbs(dead_cell, TMCB_DESTROY)))
9 years, 2 months
1
0
0
0
git:master:5147f202: tsilo: update README
by grumvalski
Module: kamailio Branch: master Commit: 5147f202520730f2521bd0081c2e7610fa3553b4 URL:
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e761…
Author: grumvalski <federico.cabiddu(a)gmail.com> Committer: grumvalski <federico.cabiddu(a)gmail.com> Date: 2015-09-23T16:23:45+02:00 tsilo: update README --- Modified: modules/tsilo/README --- Diff:
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e761…
Patch:
https://github.com/kamailio/kamailio/commit/5147f202520730f2521bd0081c2e761…
--- diff --git a/modules/tsilo/README b/modules/tsilo/README index 4af5bcc..d9e16e5 100644 --- a/modules/tsilo/README +++ b/modules/tsilo/README @@ -10,7 +10,7 @@ Federico Cabiddu <federico.cabiddu(a)gmail.com> - Copyright © 2015 Federico Cabiddu + Copyright © 2015 Federico Cabiddu __________________________________________________________________ Table of Contents @@ -93,7 +93,7 @@ Chapter 1. Admin Guide (R-URI) and add branches to them later if new contacts for the AOR are added. - For each message, the modules stores "Request-URI" ("R-URI"), URI and + For each message, the modules stores âRequest-URIâ (âR-URIâ), URI and the internal transaction index and label. When a transaction is destroyed by the TM module, it is removed from @@ -110,9 +110,6 @@ Chapter 1. Admin Guide * REGISTRAR--registrar module-- used to lookup for new contacts and update the dset for the r-uri. * TM--transaction module-- used to send SIP requests. - * USRLOC--usrloc module-- according to the value of use_domain - option, domain part of the r-uri will be used to store the - transaction. * SL 2.2. External libraries or applications @@ -132,7 +129,7 @@ Chapter 1. Admin Guide must be a power of two, otherwise it will be rounded down to the nearest power of two. - Default value is "2048". + Default value is â2048â. Example 1.1. Set hash_size parameter ...
9 years, 2 months
1
0
0
0
git:master:98cce9c0: tsilo: removed usrloc dependency from documentation
by grumvalski
Module: kamailio Branch: master Commit: 98cce9c07bb4437b607ba6aa687411edbd7e29eb URL:
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411e…
Author: grumvalski <federico.cabiddu(a)gmail.com> Committer: grumvalski <federico.cabiddu(a)gmail.com> Date: 2015-09-23T16:23:17+02:00 tsilo: removed usrloc dependency from documentation --- Modified: modules/tsilo/doc/tsilo_admin.xml --- Diff:
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411e…
Patch:
https://github.com/kamailio/kamailio/commit/98cce9c07bb4437b607ba6aa687411e…
--- diff --git a/modules/tsilo/doc/tsilo_admin.xml b/modules/tsilo/doc/tsilo_admin.xml index 43f4bac..2b16a3f 100644 --- a/modules/tsilo/doc/tsilo_admin.xml +++ b/modules/tsilo/doc/tsilo_admin.xml @@ -51,11 +51,6 @@ </listitem> <listitem> <para> - <emphasis>USRLOC</emphasis>--usrloc module-- according to the value of <emphasis>use_domain</emphasis> option, domain part of the r-uri will be used to store the transaction. - </para> - </listitem> - <listitem> - <para> <emphasis>SL</emphasis> </para> </listitem>
9 years, 2 months
1
0
0
0
git:master:ede95bf3: tsilo: removed use_domain and usrloc bindings
by grumvalski
Module: kamailio Branch: master Commit: ede95bf3b008fa8f2b50e3d6fbc6ea5b2940e721 URL:
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5…
Author: grumvalski <federico.cabiddu(a)gmail.com> Committer: grumvalski <federico.cabiddu(a)gmail.com> Date: 2015-09-23T16:20:56+02:00 tsilo: removed use_domain and usrloc bindings --- Modified: modules/tsilo/ts_store.c Modified: modules/tsilo/tsilo.c Modified: modules/tsilo/tsilo.h --- Diff:
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5…
Patch:
https://github.com/kamailio/kamailio/commit/ede95bf3b008fa8f2b50e3d6fbc6ea5…
--- diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c index e4f11ba..8c10b08 100644 --- a/modules/tsilo/ts_store.c +++ b/modules/tsilo/ts_store.c @@ -37,8 +37,6 @@ #include "ts_hash.h" #include "ts_store.h" -extern int use_domain; - int ts_store(struct sip_msg* msg, str *puri) { struct cell *t; str aor; diff --git a/modules/tsilo/tsilo.c b/modules/tsilo/tsilo.c index 411cbc4..84b172e 100644 --- a/modules/tsilo/tsilo.c +++ b/modules/tsilo/tsilo.c @@ -30,7 +30,6 @@ #include "../../script_cb.h" #include "../../modules/tm/tm_load.h" #include "../../modules/registrar/api.h" -#include "../../modules/usrloc/usrloc.h" #include "../../dset.h" #include "../../rpc_lookup.h" #include "../../lib/kcore/statistics.h" @@ -48,10 +47,6 @@ MODULE_VERSION struct tm_binds _tmb; /** REGISTRAR bind **/ registrar_api_t _regapi; -/** USRLOC BIND **/ -usrloc_api_t _ul; - -int use_domain = 0; /** parameters */ static int hash_size = 2048; @@ -132,7 +127,6 @@ struct module_exports exports = { static int mod_init(void) { unsigned int n; - bind_usrloc_t bind_usrloc; /* register the RPC methods */ if(rpc_register_array(rpc_methods)!=0) @@ -151,20 +145,7 @@ static int mod_init(void) LM_ERR("cannot load REGISTRAR API\n"); return -1; } - /* load UL-Bindings */ - bind_usrloc = (bind_usrloc_t)find_export("ul_bind_usrloc", 1, 0); - - if (!bind_usrloc) { - LM_ERR("could not load the USRLOC API\n"); - return -1; - } - - if (bind_usrloc(&_ul) < 0) { - LM_ERR("could not load the USRLOC API\n"); - return -1; - } - use_domain = _ul.use_domain; /* sanitize hash_size */ if (hash_size < 1){ LM_WARN("hash_size is smaller " diff --git a/modules/tsilo/tsilo.h b/modules/tsilo/tsilo.h index 90c965c..1daf4d4 100644 --- a/modules/tsilo/tsilo.h +++ b/modules/tsilo/tsilo.h @@ -23,15 +23,11 @@ #include "../../modules/tm/tm_load.h" #include "../../modules/registrar/api.h" -#include "../../modules/usrloc/usrloc.h" /** TM bind */ extern struct tm_binds _tmb; /** REGISTRAR bind */ extern registrar_api_t _regapi; /** USRLOC BIND **/ -extern usrloc_api_t _ul; - -extern int use_domain; #endif
9 years, 2 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
39
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Results per page:
10
25
50
100
200