THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#100 - Assignment operators don't work
User who did this - Alex Hermann (axlh)
http://sip-router.org/tracker/index.php?do=details&task_id=100
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
zenichev created an issue (kamailio/kamailio#4520)
### Description
Seg.fault while kamailio calls the pua_dialoginfo module's callback:
`run_dlg_callbacks()` -> `refresh_pubruri_avps()` (pua_dialoginfo) -> `search_first_avp()` -> `search_avp()` -> `match_by_name()` (crash while searching).
Looks like a typical iterator invalidation while going through the linked list of session AVPs.
Call scenario:
- INVITE which is branched towards three different locations
- 180 ringing replies coming from each of the call branch (almost at the same time)
- each 180 ringing is processed by a separate child process
- pua_dialoginfo's callback is in act
pua_dialoginfo configuration:
```
loadmodule "pua_dialoginfo.so"
modparam("pua_dialoginfo", "use_uuid", 1)
modparam("pua_dialoginfo", "send_publish_flag", FLB_PRESENCE)
modparam("pua_dialoginfo", "disable_caller_publish_flag", FLB_PRESENCE_CALLER)
modparam("pua_dialoginfo", "disable_callee_publish_flag", FLB_PRESENCE_CALLEE)
modparam("pua_dialoginfo", "refresh_pubruri_avps_flag", FLB_PRESENCE_REFRESH)
modparam("pua_dialoginfo", "local_identity_dlg_var", "local_identity")
modparam("pua_dialoginfo", "use_pubruri_avps", 1)
modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)")
modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller")
modparam("pua_dialoginfo", "pubruri_callee_dlg_var", "pubruri_callee")
```
Part of the BT trace (it's quite big, so I took only the most important part of it):
```
#0 match_by_name (name=<optimized out>, id=<optimized out>, avp=<optimized out>) at core/usr_avp.c:515
515 core/usr_avp.c: No such file or directory.
(gdb) set print elements unlimited
(gdb) set print pretty on
(gdb) set print repeats 0
(gdb) set print null-stop off
(gdb) bt full
#0 match_by_name (name=<optimized out>, id=<optimized out>, avp=<optimized out>) at core/usr_avp.c:515
avp_name = <optimized out>
avp_name = <optimized out>
#1 search_next_avp (s=s@entry=0x7ffe45ddbc90, val=val@entry=0x7ffe45ddbc80) at core/usr_avp.c:516
matched = <optimized out>
avp = <optimized out>
list = <optimized out>
__func__ = "search_next_avp"
#2 0x000055debd8c6913 in search_avp (ident=..., val=0x7ffe45ddbc80, state=0x7ffe45ddbc90) at core/usr_avp.c:482
ret = <optimized out>
st = {
flags = 273,
id = 53,
name = {
n = 139704944406125,
s = {
s = 0x7f0f9795ae6d "sca_to)",
len = 6
},
re = 0x7f0f9795ae6d
},
avp = 0x7f0e916fc4d0
}
list = <optimized out>
__func__ = "search_avp"
#3 0x000055debd8c6e10 in search_first_avp (flags=1, name=..., val=<optimized out>, s=<optimized out>) at core/usr_avp.c:430
id = {
flags = 1,
name = {
n = 139704913431447,
s = {
s = 0x7f0f95bd0b97 "puburis_caller)",
len = 14
},
re = 0x7f0f95bd0b97
},
index = 0
}
#4 0x00007f0e90137314 in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/pua_dialoginfo.so
No symbol table info available.
#5 0x00007f0e90137970 in refresh_pubruri_avps () from /usr/lib/x86_64-linux-gnu/kamailio/modules/pua_dialoginfo.so
No symbol table info available.
#6 0x00007f0e901385e6 in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/pua_dialoginfo.so
No symbol table info available.
#7 0x00007f0f92302b2f in run_dlg_callbacks (type=type@entry=256, dlg=dlg@entry=0x7f0e91150500, req=req@entry=0x7f0e91a79090, rpl=rpl@entry=0x7f0f98e2c620, dir=dir@entry=2, dlg_data=dlg_data@entry=0x0)
at ./src/modules/dialog/dlg_cb.c:269
cb = 0x7f0e9172e050
__func__ = "run_dlg_callbacks"
#8 0x00007f0f9232907c in dlg_onreply (t=0x7f0e907edac0, type=1048576, param=0x7ffe45ddc220) at ./src/modules/dialog/dlg_handlers.c:510
dlg = 0x7f0e91150500
iuid = <optimized out>
new_state = 2
old_state = 2
unref = 0
event = 2
tag = {
s = 0x341 <error: Cannot access memory at address 0x341>,
len = 16
}
req = 0x7f0e91a79090
rpl = 0x7f0f98e2c620
__func__ = "dlg_onreply"
```
F.y.i: the processing starts with `reply_received()` -> `relay_reply()` -> `run_trans_callbacks_with_buf()` -> `run_trans_callbacks_internal()` -> `run_dlg_callbacks()` (the rest you see in the copy-paste of the bt trace above).
### Troubleshooting
Configure the pua_dialoginfo module similarly as mentioned above (modparams).
Call scenario:
- INVITE which gets forked (branched) into three legs
- 180 ringing is coming from each of the call leg
P.S.: hardly reproducible, quite sporadic
### Kamailio version
```
version: kamailio 5.8.6 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, NO_SIG_DEBUG, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_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 12.2.0
```
```
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
```
---
P.S.: any workaround you can suggest? Like always setting the `$avp(s:puburis_caller)` to `$null` when the process begins the kamailio script execution? (entry route), at least for the requests (so not replies).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4520
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4520(a)github.com>
linuxmaniac created an issue (kamailio/kamailio#4420)
### Description
There's no indication on the documentation that the user that execute kamailio service needs certain capabilities in order ipsec to work properly. There's no error or warning message neither.
### Troubleshooting
#### Reproduction
execute ``kamailio`` with ``-u kamailio -g kamailio`` (as default in deb packages ). The ipsec tunnels never get created.
Do the same thing but with ``-u root -g root`` or with systemd override config as:
```
[Service]
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW
```
#### Debugging Data
You can use ``ip xfrm monitor`` to debug it.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4420
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4420(a)github.com>
sergey-safarov created an issue (kamailio/kamailio#4374)
During build used `wolfssl-dev-5.7.6-r0`
```
In file included from /home/build/kamailio/pkg/kamailio/alpine/src/kamailio-6.0.1/src/modules/tls_wolfssl/tls_config.c:29:
/home/build/kamailio/pkg/kamailio/alpine/src/kamailio-6.0.1/src/modules/tls_wolfssl/tls_util.h: In function 'tls_err_ret':
/home/build/kamailio/pkg/kamailio/alpine/src/kamailio-6.0.1/src/modules/tls_wolfssl/tls_util.h:44:30: error: implicit declaration of function 'wolfSSL_get_servername'; did you mean 'wolfSSL_get_curve_name'? [-Wimplicit-function-declaration]
44 | sn = wolfSSL_get_servername(ssl, WOLFSSL_SNI_HOST_NAME);
| ^~~~~~~~~~~~~~~~~~~~~~
| wolfSSL_get_curve_name
/home/build/kamailio/pkg/kamailio/alpine/src/kamailio-6.0.1/src/modules/tls_wolfssl/tls_util.h:44:28: error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
44 | sn = wolfSSL_get_servername(ssl, WOLFSSL_SNI_HOST_NAME);
| ^
/home/build/kamailio/pkg/kamailio/alpine/src/kamailio-6.0.1/src/modules/tls_wolfssl/tls_util.h:46:30: error: implicit declaration of function 'ERR_get_error' [-Wimplicit-function-declaration]
46 | while((err = ERR_get_error())) {
| ^~~~~~~~~~~~~
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4374
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4374(a)github.com>
linuxmaniac created an issue (kamailio/kamailio#4235)
Finally I had the time and patience to address the last issues in our deb environment. Now build flow is by _distribution/architecture_ so errors doesn't interfere in a healthy _distribution/architecture_ combination.
> Follow up: same situation
>
> - **bookworm**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> /usr/bin/make every-module group_include="kerlang" quiet=verbose
> make[1]: Entering directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1'
> /usr/bin/make -C src/ every-module
> make[2]: Entering directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1/src'
> config.mak loaded
> Makefile.defs defs skipped
> Makefile.defs defs skipped
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation fault
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation fault
> Makefile:16: *** Not found Erlang. Stop.
> make[2]: *** [Makefile:509: modules] Error 1
> make[2]: Leaving directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1/src'
> make[1]: *** [Makefile:34: every-module] Error 2
> make[1]: Leaving directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1'
> make: *** [debian/rules:134: build_erlang] Error 2
> make: *** Waiting for unfinished jobs....
> ```
>
> - **bionic**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> gcc -shared -g -pthread -Wl,-O2 -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_util.o tls_cfg.o tls_config.o -lm /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a -o tlsa.so
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): In function `sha1_block_armv8':
> (.text+0x1240): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): In function `poly1305_emit_neon':
> (.text+0x9a0): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): In function `sha256_block_data_order':
> (.text+0xf88): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): In function `sha512_block_data_order':
> (.text+0x10c8): dangerous relocation: unsupported relocation
> collect2: error: ld returned 1 exit status
> ../../Makefile.rules:191: recipe for target 'tlsa.so' failed
> make[3]: *** [tlsa.so] Error 1
> ```
>
> - **focal**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> gcc -shared -g -pthread -Wl,-O2 -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_util.o tls_cfg.o tls_config.o -lm /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a -o tlsa.so
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
> (.text+0x1240): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_emit_neon':
> (.text+0x9a0): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): in function `sha256_block_data_order':
> (.text+0xf88): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): in function `sha512_block_data_order':
> (.text+0x1108): dangerous relocation: unsupported relocation
> collect2: error: ld returned 1 exit status
> ```
>
_Originally posted by @linuxmaniac in [#13](https://github.com/sipwise/kamailio-deb-jenkins/issues/13#issuecomment-2866741862)_
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4235
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4235(a)github.com>
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Move permissions module to work with hash tables instead of directly working with lists.
Use locks to cover these hash tables.
This allows to avoid using crutches alike 0039c50e83916,
and gives a race-free usage of tables regardless the amount of data inserted into tables and regardless how many competitive reloads are pending at a time (e.g. 2-3 RPC commands sent at a time to reload same tables).
Use hash indexes for a quicker lookup in buckets.
Improve the mechanism of duplicate entries detection,
use: the source ip, ruri pattern, from pattern and the protocol to detect existing similar entries.
Add more safety checks in functions manipulating hash tables,
like checking NULL pointers, empty patterns for matching purposes etc.
Align return values in trusted/hash implementations so that return values are everywhere considered in the similar way
(everything != 0 is considered as failure, 0 is considered as fine).
Split tables allocation and initialization.
Add destruction handlers for tables instead of manually handling
entries freeing.
Some other minor improvements.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4539
-- Commit Summary --
* permissions: remove the permissions reload rework
* permissions: hash header, remove dangling declarations
* permissions: support locked tables
* permissions: module rework to support locks
* permissions: remove unsed hash functions
-- File Changes --
M src/modules/permissions/hash.c (566)
M src/modules/permissions/hash.h (64)
M src/modules/permissions/rpc.c (18)
M src/modules/permissions/trusted.c (143)
M src/modules/permissions/trusted.h (11)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4539.patchhttps://github.com/kamailio/kamailio/pull/4539.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4539
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4539(a)github.com>
Sda79 created an issue (kamailio/kamailio#4502)
### Description
After I installed Kamailio on Debian 13 following https://deb.kamailio.org/ I get the following warning when running `apt update` command :
```
Warning : https://deb.kamailio.org/kamailio60/dists/trixie/InRelease: Policy will reject signature within a year, see --audit for details
```
and after running `apt update --audit`:
```
Audit : https://deb.kamailio.org/kamailio60/dists/trixie/InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is:
Signing key on E79ACECB87D8DCD23A20AD2FFB40D3E6508EA4C8 is not bound:
No binding signature at time 2025-11-06T11:33:50Z
because: Policy rejected non-revocation signature (PositiveCertification) requiring second pre-image resistance
because: SHA1 is not considered secure since 2026-02-01T00:00:00Z
```
The problem seems to be **SHA1** here.
#### Reproduction
Install Kamailio repository from deb.kamailio.org on Debian 13 Trixie.
I hope it's the right place to post this issue, and that this is not a duplicate.
Thank you
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4502
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4502(a)github.com>
sergey-safarov created an issue (kamailio/kamailio#4439)
```
[ 0%] Building C object src/modules/ctl/CMakeFiles/ctl.dir/ctrl_socks.c.o
cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/redhat-linux-build/src/modules/ctl && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH=\"x86_64\" -DCC_GCC_LIKE_ASM -DCFG_DIR=\"/etc/kamailio/\" -DCOMPILER="\"gcc 14.3.1\"" -DCTL_SYSTEM_MALLOC -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMEM_JOIN_FREE -DMOD_NAME=\"ctl\" -DMOD_NAMEID=ctl -DNAME=\"kamailio\" -DOS=Linux -DOS_QUOTED=\"Linux\" -DPKG_MALLOC -DQ_MALLOC -DRUN_DIR=\"/run/kamailio\" -DSHARE_DIR=\"/usr/share/kamailio/\" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_CORE_STATS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_FIFO -DUSE_FUTEX -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION=\"6.1.0-dev1\" -DVERSIONVAL=6001000 -D__CPU_x86_64 -D__OS_linux -Dctl_EXPORTS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/= -fPIC -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/ctl/CMakeFiles/ctl.dir/ctrl_socks.c.o -MF CMakeFiles/ctl.dir/ctrl_socks.c.o.d -o CMakeFiles/ctl.dir/ctrl_socks.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/ctrl_socks.c
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 16 bytes into a region of size 8 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [2, 10] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [42, 2147483628] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset 10 into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [42, 2147483628] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset 10 into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [43, 2147483629] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [11, 13] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [43, 2147483629] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [11, 13] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [44, 2147483630] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [12, 14] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [44, 2147483630] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [12, 14] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [45, 2147483631] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [13, 15] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [45, 2147483631] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [13, 15] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [46, 2147483632] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [14, 16] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [46, 2147483632] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [14, 16] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [47, 2147483633] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [15, 17] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [47, 2147483633] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [15, 17] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [48, 2147483634] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [16, 18] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [48, 2147483634] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [16, 18] into destination object ‘hdr.5’ of size 10
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4439
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4439(a)github.com>
therikb31 created an issue (kamailio/kamailio#4296)
For network-initiated UE de-registration, `ims_registrar_scscf` is populating the `Subscription-State` header of the `NOTIFY` message as `active;expires=3581` instead of `terminated`.
### Description
We are simulating a network-initiated UE de-registration by sending a **Registration-Termination Request** from the HSS to the S-CSCF for a registered IMSI.
**Call Flow**:
1. UE registers to the IMS core
2. S-CSCF performs third-party registration with the Application Server on behalf of the UE
3. Application Server subscribes to `Event: reg` for the registered IMSI
4. HSS sends a Registration-Termination Request for network-initiated UE de-registration
5. S-CSCF sends a `NOTIFY` to subscribers for the `IMS_REGISTRAR_CONTACT_DEREGISTERED` event (issue with the `NOTIFY` SIP message)
**Observation**:
1. `NOTIFY` messages are initiated to subscribers of `Event: reg`, but instead of having the `Subscription-State` header set to **terminated**, we observe the value **active;expires=3581**.
(Image for the `NOTIFY` SIP message packet is attached below)

### Troubleshooting
#### Reproduction
To reproduce this, we are performing the following steps:
1. Performing SIP registration of the UE with the target S-CSCF node
2. Sending `SUBSCRIBE` requests from a third-party Application Server and the UE with `Event: reg` to get notified of registration events
3. HSS sends a `Registration-Termination Request` to the target S-CSCF for the registered IMSI (network-initiated de-registration)
#### Debugging Data
#### Log Messages
While going through the logs, we find that this header is being populated based on the expiry timer and a comparison with the current timestamp:
```
2025-06-20 12:45:20 | 19(56) DEBUG: ims_registrar_scscf [registrar_notify.c:1716]: create_notifications(): Expires is greater than current time! Subscription state: [active;expires=3581]
```
#### SIP Traffic
### Possible Solutions
**Workaround**:
In the `create_notifications()` method of `src/modules/ims_registrar_scscf/registrar_notify.c`,
when populating the `Subscription-State` header, if the `event_type` is `10` (`IMS_REGISTRAR_CONTACT_DEREGISTERED`), we can populate `Subscription-State` as `terminated`.
### Additional Information
---
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4296
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4296(a)github.com>