Privilege escalation protection disabled

From Kolmisoft Wiki
Revision as of 06:14, 26 July 2018 by Edvardas (talk | contribs) (Created page with '=About= Asterisk fails to start with the flowing errors: [root@kolmisoft]# Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more deta…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

About

Asterisk fails to start with the flowing errors:

[root@kolmisoft]# Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
The 'languageprefix' option in asterisk.conf is deprecated; in a future release it will be removed, and your sound files will need to be organized in the 'new style' language layout.
/usr/sbin/safe_asterisk: line 118:  6969 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
cat: /var/run/asterisk.pid: No such file or directory
Automatically restarting Asterisk.
chan_sip.so => (Session Initiation Protocol (SIP))
 == Parsing '/etc/asterisk/iax.conf':   == Found
 == Parsing '/var/tmp/exec.1532546630765706.140312571631584':   == Found
 == Parsing '/etc/asterisk/users.conf':   == Found
 == Binding IAX2 to default address 0.0.0.0:4569
 == Registered application 'IAX2Provision'
 == Registered custom function 'IAXPEER'
 == Registered custom function 'IAXVAR'
 == Manager registered action IAXpeers
 == Manager registered action IAXpeerlist
 == Manager registered action IAXnetstats
 == Manager registered action IAXregistry
 == Registered channel type 'IAX2' (Inter Asterisk eXchange Driver (Ver 2))
 == 10 helper threads started
 == IAX Ready and Listening
 == Parsing '/etc/asterisk/iaxprov.conf':   == Found
   -- Loaded provisioning template 'default'
Segmentation fault (core dumped)

dmesg messages:

[120431.598206] asterisk[11119]: segfault at 25d68a9 ip 00007f6a96ec08d0 sp 00007fff87ca9c30 error 4 in libc-2.12.so[7f6a96e3d000+18a000]
[120443.935017] asterisk[11298]: segfault at 1ff99ab ip 00007f12f0c978d0 sp 00007fff2344ee00 error 4 in libc-2.12.so[7f12f0c14000+18a000]
[120446.604658] asterisk[11406]: segfault at 6b627056 ip 0000000000493789 sp 00007ffd18b7f6d0 error 6 in asterisk[400000+1dd000]
[120539.990502] asterisk[13792]: segfault at ee85e51 ip 0000000000493789 sp 00007ffd7674fb90 error 6 in asterisk[400000+1dd000]

Core dump output:

(gdb) bt
#0  dbt_data2str (cb=0x492f40 <db_deltree_cb>, data=0x0, filter=0x7ffe36495b90 "/iax/provisioning/cache", sync=1) at db.c:163
#1  dbt_data2str_full (cb=0x492f40 <db_deltree_cb>, data=0x0, filter=0x7ffe36495b90 "/iax/provisioning/cache", sync=1) at db.c:171
#2  process_db_keys (cb=0x492f40 <db_deltree_cb>, data=0x0, filter=0x7ffe36495b90 "/iax/provisioning/cache", sync=1) at db.c:214
#3  0x0000000000493ba1 in ast_db_deltree (family=<value optimized out>, keytree=<value optimized out>) at db.c:257
#4  0x00007f1e2cf0c1dd in iax_provision_reload (reload=<value optimized out>) at iax2-provision.c:562
#5  0x00007f1e2cef7e96 in load_module () at chan_iax2.c:15057
#6  0x00000000004d0af3 in start_resource (mod=0x129c3b0) at loader.c:856
#7  0x00000000004d2c82 in load_resource_list (load_order=0x7ffe36495f40, global_symbols=0, mod_count=0x7ffe36495f5c) at loader.c:1049
#8  0x00000000004d32b2 in load_modules (preload_only=0) at loader.c:1202
#9  0x000000000043b57d in main (argc=<value optimized out>, argv=<value optimized out>) at asterisk.c:4080
(gdb)

Reason

These errors happens because Asterisk internal database is corrupted.

How to solve

Make a copy of Asterisk internal database:

cp /var/lib/asterisk/astdb /home/copy_of_astdb

Remove Asterisk internal database, new database will be created automatically:

rm -rf /var/lib/asterisk/astdb

Start Asterisk service:

service asterisk restart