Module: kamailio
Branch: master
Commit: 743f5dca220b8f1e6a863cd9f68fdeb9c2dc7237
URL: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2019-10-29T09:31:25+01:00
modules: readme files regenerated - uac ... [skip ci]
---
Modified: src/modules/uac/README
---
Diff: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
Patch: https://github.com/kamailio/kamailio/commit/743f5dca220b8f1e6a863cd9f68fdeb…
---
diff --git a/src/modules/uac/README b/src/modules/uac/README
index caeb998e93..b0e4f76f43 100644
--- a/src/modules/uac/README
+++ b/src/modules/uac/README
@@ -61,7 +61,7 @@ Ramona-Elena Modroiu
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -179,7 +179,7 @@ Chapter 1. Admin Guide
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -596,7 +596,7 @@ modparam("uac", "reg_gc_interval", 60)
4.4. uac_replace_to(display,uri)
4.5. uac_replace_to(uri)
4.6. uac_restore_to()
- 4.7. uac_auth()
+ 4.7. uac_auth([mode])
4.8. uac_req_send()
4.9. uac_reg_lookup(uuid, dst)
4.10. uac_reg_status(uuid)
@@ -743,12 +743,16 @@ uac_replace_to("sip:batman@gotham.org");
uac_restore_to();
...
-4.7. uac_auth()
+4.7. uac_auth([mode])
This function can be called only from failure route and will build the
authentication response header and insert it into the request without
sending anything.
+ If mode is set to 1, then the password has to be provided in HA1
+ format. The parameter can be a static integer or a variable holding an
+ integer value.
+
This function can be used from FAILURE_ROUTE.
Example 1.28. uac_auth usage
@@ -773,7 +777,9 @@ failure_route[TRUNKAUTH] {
if(t_check_status("401|407")) {
$avp(auser) = "test";
$avp(apass) = "test";
+ # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
uac_auth();
+ # uac_auth("1");
t_relay();
exit;
}
@@ -838,10 +844,16 @@ $var(status) = uac_reg_status("$rU");
This function can be used to send an authenticated request to a remote
user in the uac registrations table. It sets the request-uri, dst-uri
- and auth_*_avp pv's to the values that correspond to the supplied user.
-
- The mode indicates whether the user should match the local uuid
- (mode=0), or the username (mode=1).
+ and auth_*_avp variables to the values that correspond to the supplied
+ user.
+
+ The mode is a bitwise set of flags controlling how the matching of the
+ record is done and what field is used to set auth_password_avp:
+ * indicates whether the user should match the local uuid (bit
+ value=0), or the username (bit value=1, int value=1).
+ * indicates whether the auth_password value is used to set
+ auth_password_avp (bit value=0), or the auth_ha1 value (bit
+ value=1, int value=2).
The auth_*_avp module parameters must be set to valid pv's.
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I'm using uac module to remote authenticate to a trunk. With the addition of ha1 used instead of plaintext password it is also would be nice to be able to use uac_reg_request_to with it.
### Expected behavior
There should be auth_ha1_avp for uac module, which will use ha1 instead of plaintext to build the request
#### Actual observed behavior
auth_password_avp is set to empty string or dot respectively of how you specify it in database, ha1 is not used in uac_reg_request_to
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
Well logically auth_ha1_avp should be prioritized over auth_password_ha1
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.0-dev1 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Debian 10 in docker```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2102
Module: kamailio
Branch: master
Commit: 825800e6d3f297076bcce90f1f82c65a91cbb583
URL: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-29T09:25:06+01:00
uac: updated docs for uac_auth()
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
Patch: https://github.com/kamailio/kamailio/commit/825800e6d3f297076bcce90f1f82c65…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index e0ea527776..f718924dad 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -802,14 +802,18 @@ uac_restore_to();
</section>
<section id="uac.f.uac_auth">
<title>
- <function moreinfo="none">uac_auth()</function>
+ <function moreinfo="none">uac_auth([mode])</function>
</title>
<para>
- This function can be called only from failure route and will
+ This function can be called only from failure route and will
build the authentication response header and insert it into the
request without sending anything.
</para>
<para>
+ If mode is set to 1, then the password has to be provided in HA1 format.
+ The parameter can be a static integer or a variable holding an integer value.
+ </para>
+ <para>
This function can be used from FAILURE_ROUTE.
</para>
<example>
@@ -836,7 +840,9 @@ failure_route[TRUNKAUTH] {
if(t_check_status("401|407")) {
$avp(auser) = "test";
$avp(apass) = "test";
+ # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
uac_auth();
+ # uac_auth("1");
t_relay();
exit;
}
Module: kamailio
Branch: master
Commit: 08e676654d901644724f52478a88c6d0258304cc
URL: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-29T08:49:27+01:00
uac: updated docs for uac_req_request_to()
---
Modified: src/modules/uac/doc/uac_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
Patch: https://github.com/kamailio/kamailio/commit/08e676654d901644724f52478a88c6d…
---
diff --git a/src/modules/uac/doc/uac_admin.xml b/src/modules/uac/doc/uac_admin.xml
index 8ddf26ca0f..e0ea527776 100644
--- a/src/modules/uac/doc/uac_admin.xml
+++ b/src/modules/uac/doc/uac_admin.xml
@@ -951,12 +951,27 @@ $var(status) = uac_reg_status("$rU");
<function moreinfo="none">uac_reg_request_to(user, mode)</function>
</title>
<para>
- This function can be used to send an authenticated request to a remote user in
+ This function can be used to send an authenticated request to a remote user in
the uac registrations table. It sets the request-uri, dst-uri and auth_*_avp
- pv's to the values that correspond to the supplied user.
+ variables to the values that correspond to the supplied user.
</para>
<para>
- The mode indicates whether the user should match the local uuid (mode=0), or the username (mode=1).
+ The mode is a bitwise set of flags controlling how the matching of
+ the record is done and what field is used to set auth_password_avp:
+ <itemizedlist>
+ <listitem>
+ <para>
+ indicates whether the user should match the local uuid (bit value=0),
+ or the username (bit value=1, int value=1).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ indicates whether the auth_password value is used to set auth_password_avp
+ (bit value=0), or the auth_ha1 value (bit value=1, int value=2).
+ </para>
+ </listitem>
+ </itemizedlist>
</para>
<para>
The auth_*_avp module parameters must be set to valid pv's.
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
I have sent malformed data to kamailio server and its getting crashed.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
This can be easily reproducable by remove .(eol) from each line of invite packet
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
32(78) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 13
0(46) ALERT: <core> [main.c:745]: handle_sigs(): child process 47 exited by a signal 11
0(46) ALERT: <core> [main.c:748]: handle_sigs(): core was generated
0(46) INFO: <core> [main.c:771]: handle_sigs(): terminating due to SIGCHLD
2(48) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
6(52) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
8(54) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
12(58) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
13(59) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
15(61) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
17(63) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
18(64) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
20(66) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
22(68) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
24(70) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
26(72) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
28(74) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
32(78) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
25(71) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
21(67) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
23(69) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
14(60) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
3(49) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
29(75) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
19(65) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
30(76) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
11(57) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
7(53) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
31(77) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
16(62) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
9(55) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
27(73) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
10(56) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
4(50) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
5(51) INFO: <core> [main.c:826]: sig_usr(): signal 15 received
0(46) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
2019/08/26 06:14:51.186871 [ERR] (cli) child process died with exit code 1
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
INVITE sip:9631793333@10.130.72.178:5060 SIP/2.0
Max-Forwards: 66
From: "9631791999" <sip:9631791999@test.santhos.com>;tag=8BpeDNKX9g7ZN
To: <sip:12254431343@52.77.251.154>
Call-ID: 0e61d723-400b-1238-5ea2-029e611e72cc
CSeq: 8715558 INVITE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 248
Remote-Party-ID: "9631791999" <sip:9631791999@test.santhos.com>;party=calling;screen=yes;privacy=off
Contact: <sip:btpsh-5d5dab4f-36-1@3.82.91.199;alias=10.130.74.48~5060~1>
User-Agent: NewServer
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,UPDATE
v=0
o=- 1566538700029766 7092256907260767331 IN IP4 3.220.58.181
s=X-Lite release 5.6.1 stamp 99140
c=IN IP4 3.220.58.181
t=0 0
m=audio 10030 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@test-server:/# kamailio -v
version: kamailio 5.1.4 (x86_64/linux) cc647d
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: cc647d
compiled on 10:09:16 Jul 29 2019 with gcc 5.4.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
root@test-server:/# cat /etc/debian_version
stretch/sid
root@test-server:/# uname -a
Linux test-server 4.14.77-69.57.amzn1.x86_64 #1 SMP Tue Nov 6 21:32:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2044