public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/asterisk] epel8: Merge branch 'f44' into epel8
@ 2026-11-02 14:33 Peter Lemenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Lemenkov @ 2026-11-02 14:33 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/asterisk
Branch : epel8
Commit : d252bd0cd4ad5537fb231e47983e8a516cad83a4
Author : Peter Lemenkov <lemenkov@gmail.com>
Date   : 2026-11-02T15:31:05+01:00
Stats  : +1742/-236 in 28 file(s)
URL    : https://src.fedoraproject.org/rpms/asterisk/c/d252bd0cd4ad5537fb231e47983e8a516cad83a4?branch=epel8

Log:
Merge branch 'f44' into epel8

---
diff --git a/0001-Include-mariadb_version.h-instead-of-mysql_version.h.patch b/0001-Include-mariadb_version.h-instead-of-mysql_version.h.patch
new file mode 100644
index 0000000..4e74ef6
--- /dev/null
+++ b/0001-Include-mariadb_version.h-instead-of-mysql_version.h.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tom Hughes <tom@compton.nu>
+Date: Fri, 1 Sep 2017 21:47:55 +0100
+Subject: [PATCH] Include mariadb_version.h instead of mysql_version.h
+
+
+diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
+index 25f8762c61..75fdc60d6c 100644
+--- a/addons/cdr_mysql.c
++++ b/addons/cdr_mysql.c
+@@ -45,6 +45,7 @@
+ #include "asterisk.h"
+ 
+ #include <mysql/mysql.h>
++#include <mysql/mariadb_version.h>
+ #include <mysql/errmsg.h>
+ 
+ #include "asterisk/config.h"
+@@ -650,7 +651,7 @@ static int my_load_module(int reload)
+ 	res |= my_load_config_string(cfg, "global", "ssl_cert", &ssl_cert, "");
+ 	res |= my_load_config_string(cfg, "global", "ssl_key", &ssl_key, "");
+ 
+-	res |= my_load_config_number(cfg, "global", "port", &dbport, MYSQL_PORT);
++	res |= my_load_config_number(cfg, "global", "port", &dbport, MARIADB_PORT);
+ 	res |= my_load_config_number(cfg, "global", "timeout", &timeout, 0);
+ 	res |= my_load_config_string(cfg, "global", "compat", &compat, "no");
+ 	res |= my_load_config_string(cfg, "global", "cdrzone", &cdrzone, "");
+diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
+index 11f73207ed..04e68dbab5 100644
+--- a/addons/res_config_mysql.c
++++ b/addons/res_config_mysql.c
+@@ -33,6 +33,7 @@
+ #include <sys/stat.h>
+ 
+ #include <mysql/mysql.h>
++#include <mysql/mariadb_version.h>
+ #include <mysql/errmsg.h>
+ 
+ #include "asterisk/channel.h"

diff --git a/0002-Update-from-python2-to-python3-for-various-scripts.patch b/0002-Update-from-python2-to-python3-for-various-scripts.patch
new file mode 100644
index 0000000..522552f
--- /dev/null
+++ b/0002-Update-from-python2-to-python3-for-various-scripts.patch
@@ -0,0 +1,119 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jared Smith <jsmith@fedoraproject.org>
+Date: Fri, 15 Nov 2019 07:59:29 -0500
+Subject: [PATCH] Update from python2 to python3 for various scripts
+
+
+diff --git a/build_tools/get_documentation.py b/build_tools/get_documentation.py
+index 3211896460..41d1689955 100644
+--- a/build_tools/get_documentation.py
++++ b/build_tools/get_documentation.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ # vin: sw=3 et:
+ '''
+ Copyright (C) 2012, Digium, Inc.
+diff --git a/build_tools/post_process_documentation.py b/build_tools/post_process_documentation.py
+index c1496beabf..aeb3e68ad4 100644
+--- a/build_tools/post_process_documentation.py
++++ b/build_tools/post_process_documentation.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/python3
+ # vin: sw=3 et:
+ '''
+ Copyright (C) 2012, Digium, Inc.
+diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
+index d0bad282de..269d5c61da 100755
+--- a/contrib/scripts/ast_coredumper
++++ b/contrib/scripts/ast_coredumper
+@@ -421,7 +421,7 @@ check_gdb() {
+ 		EOF
+ 	fi
+ 
+-	result=$($GDB --batch --ex "python print('hello')" 2>/dev/null || : )
++	result=$($GDB --batch --ex "python2 print('hello')" 2>/dev/null || : )
+ 	if [[ ! "$result" =~ ^hello$ ]] ; then
+ 		die -2 <<-EOF
+ 		$GDB does not support python.
+diff --git a/contrib/scripts/refcounter.py b/contrib/scripts/refcounter.py
+index 146a024c90..807623b4bc 100755
+--- a/contrib/scripts/refcounter.py
++++ b/contrib/scripts/refcounter.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Process a ref debug log
+ 
+  This file will process a log file created by enabling
+diff --git a/contrib/scripts/reflocks.py b/contrib/scripts/reflocks.py
+index db1985f8a5..29144a4f02 100755
+--- a/contrib/scripts/reflocks.py
++++ b/contrib/scripts/reflocks.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Process a ref debug log for lock usage
+ 
+  This file will process a log file created by Asterisk
+diff --git a/contrib/scripts/refstats.py b/contrib/scripts/refstats.py
+index 93df02f64a..3df82834d4 100755
+--- a/contrib/scripts/refstats.py
++++ b/contrib/scripts/refstats.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Process a ref debug log for memory usage
+ 
+  This will provide information about total and peak
+diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+index 10f6b33d1b..b4be16af1c 100755
+--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
++++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ from __future__ import print_function
+ 
+diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
+index 2469ffc9fe..9492747cc3 100755
+--- a/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
++++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ 
+ from sip_to_pjsip import convert
+ import sip_to_pjsip
+diff --git a/contrib/scripts/spandspflow2pcap.py b/contrib/scripts/spandspflow2pcap.py
+index 442e15fb9c..687db83dbe 100644
+--- a/contrib/scripts/spandspflow2pcap.py
++++ b/contrib/scripts/spandspflow2pcap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # vim: set ts=8 sw=4 sts=4 et ai tw=79:
+ '''
+ Usage: ./spandspflow2pcap.py SPANDSP_LOG SENDFAX_PCAP
+diff --git a/contrib/scripts/voicemailpwcheck.py b/contrib/scripts/voicemailpwcheck.py
+index 7636df3127..77203099c1 100755
+--- a/contrib/scripts/voicemailpwcheck.py
++++ b/contrib/scripts/voicemailpwcheck.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ ''' Sample externpasscheck script for use with voicemail.conf
+ 
+ Copyright (C) 2010, Digium, Inc.
+diff --git a/rest-api-templates/make_ari_stubs.py b/rest-api-templates/make_ari_stubs.py
+index 644f819041..ae1b9d6f3c 100755
+--- a/rest-api-templates/make_ari_stubs.py
++++ b/rest-api-templates/make_ari_stubs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # Asterisk -- An open source telephony toolkit.
+ #
+ # Copyright (C) 2013, Digium, Inc.

diff --git a/0003-Ignore-ASTMM.patch b/0003-Ignore-ASTMM.patch
new file mode 100644
index 0000000..524e70c
--- /dev/null
+++ b/0003-Ignore-ASTMM.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
+Date: Thu, 7 Apr 2022 16:58:08 +0200
+Subject: [PATCH] Ignore ASTMM
+
+
+diff --git a/channels/console_board.c b/channels/console_board.c
+index 6d24d16170..2860aa39f7 100644
+--- a/channels/console_board.c
++++ b/channels/console_board.c
+@@ -41,6 +41,7 @@
+ 	<support_level>extended</support_level>
+  ***/
+ 
++#define ASTMM_LIBC ASTMM_IGNORE
+ #include "asterisk.h"	/* ast_strdupa */
+ #include "asterisk/utils.h"	/* ast_strdupa */
+ #include "console_video.h"	/* ast_strdupa */

diff --git a/0004-handle-ilbc-v3-errors.patch b/0004-handle-ilbc-v3-errors.patch
new file mode 100644
index 0000000..01946be
--- /dev/null
+++ b/0004-handle-ilbc-v3-errors.patch
@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
+Date: Wed, 15 Jun 2022 17:40:46 +0200
+Subject: [PATCH] handle ilbc v3 errors
+
+
+diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
+index 536d68026e..c75cbb7a48 100644
+--- a/codecs/codec_ilbc.c
++++ b/codecs/codec_ilbc.c
+@@ -45,6 +45,11 @@
+ typedef uint16_t ilbc_bytes;
+ typedef int16_t  ilbc_block;
+ #define BUF_TYPE i16
++/* In the ilbc library were removed RFC 3951 compatibility macros */
++#define initDecode WebRtcIlbcfix_InitDecode
++#define initEncode WebRtcIlbcfix_InitEncode
++#define iLBC_decode WebRtcIlbcfix_DecodeImpl
++#define iLBC_encode WebRtcIlbcfix_EncodeImpl
+ #else
+ #include "ilbc/iLBC_encode.h"
+ #include "ilbc/iLBC_decode.h"

diff --git a/0005-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch b/0005-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
new file mode 100644
index 0000000..f890432
--- /dev/null
+++ b/0005-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Thomas B. Clark" <git@ferree-clark.org>
+Date: Mon, 12 May 2025 17:46:00 -0400
+Subject: [PATCH] menuselect: Fix GTK menu callbacks for Fedora 42
+ compatibility
+
+This patch resolves a build failure in `menuselect_gtk.c` when running
+`make menuconfig` on Fedora 42. The new version of GTK introduced stricter
+type checking for callback signatures.
+
+Changes include:
+- Add wrapper functions to match the expected `void (*)(void)` signature.
+- Update `menu_items` array to use these wrappers.
+
+Fixes: #1243
+
+diff --git a/menuselect/menuselect_gtk.c b/menuselect/menuselect_gtk.c
+index 2e8b5b1f5b..ced8bc4c4d 100644
+--- a/menuselect/menuselect_gtk.c
++++ b/menuselect/menuselect_gtk.c
+@@ -48,9 +48,9 @@ enum {
+ 	NUM_COLUMNS,
+ };
+ 
+-static void handle_save(GtkWidget *w, gpointer data);
+-static void handle_about(GtkWidget *w, gpointer data);
+-static void handle_quit(GtkWidget *w, gpointer data);
++static void handle_save(void);
++static void handle_about(void);
++static void handle_quit(void);
+ 
+ static GtkItemFactoryEntry menu_items[] = {
+   { "/_File",               NULL,         NULL,           0, "<Branch>" },
+@@ -70,13 +70,13 @@ static GtkWidget *window;
+ static int main_res = 1;
+ static int change_made = 0;
+ 
+-static void handle_save(GtkWidget *w, gpointer data)
++static void handle_save()
+ {
+ 	main_res = 0;
+ 	gtk_main_quit();
+ }
+ 
+-static void handle_about(GtkWidget *w, gpointer data)
++static void handle_about()
+ {
+ 	GtkWidget *dialog;
+ 
+@@ -95,7 +95,7 @@ static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
+ 	return FALSE;
+ }
+ 
+-static void handle_quit(GtkWidget *widget, gpointer data)
++static void handle_quit()
+ {
+ 	gtk_main_quit();
+ }

diff --git a/0006-chan_unistim.c-Prevent-overrun-of-phone_number-field.patch b/0006-chan_unistim.c-Prevent-overrun-of-phone_number-field.patch
new file mode 100644
index 0000000..8c1d32e
--- /dev/null
+++ b/0006-chan_unistim.c-Prevent-overrun-of-phone_number-field.patch
@@ -0,0 +1,38 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Mon, 15 Jun 2026 07:41:10 -0600
+Subject: [PATCH] chan_unistim.c: Prevent overrun of phone_number field.
+
+Add a check to key_dial_page() to ensure that dialed digits won't overrun
+the phone_number field.
+
+Resolves: #GHSA-3g56-cgrh-95p5
+(cherry picked from commit fc3a1cb3c386c962bfca8cd9d533d1390d4ad933)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
+index f813e349d6..2280d880de 100644
+--- a/channels/chan_unistim.c
++++ b/channels/chan_unistim.c
+@@ -455,6 +455,8 @@ static struct unistim_device {
+ 	struct unistim_device *next;
+ } *devices = NULL;
+ 
++#define MAX_PHONE_NUMBER_LENGTH (AST_MAX_EXTENSION - 1)
++
+ static struct unistimsession {
+ 	ast_mutex_t lock;
+ 	struct sockaddr_in sin;	 /*!< IP address of the phone */
+@@ -3577,6 +3579,12 @@ static void key_dial_page(struct unistimsession *pte, char keycode)
+ 	if ((keycode >= KEY_0) && (keycode <= KEY_SHARP)) {
+ 		int i = pte->device->size_phone_number;
+ 
++		/*
++		 * If the phone_number buffer is already full, bail now to prevent an overrun.
++		 */
++		if (pte->device->size_phone_number >= MAX_PHONE_NUMBER_LENGTH) {
++			return;
++		}
+ 		if (pte->device->size_phone_number == 0) {
+ 			send_tone(pte, 0, 0);
+ 		}

diff --git a/0007-pjsip_message_filter-Use-pj_strdup-instead-of-pj_str.patch b/0007-pjsip_message_filter-Use-pj_strdup-instead-of-pj_str.patch
new file mode 100644
index 0000000..c6a95bd
--- /dev/null
+++ b/0007-pjsip_message_filter-Use-pj_strdup-instead-of-pj_str.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Wed, 10 Jun 2026 17:07:07 -0600
+Subject: [PATCH] pjsip_message_filter: Use pj_strdup instead of pj_strassign
+ to save local address.
+
+The filter_on_tx_message() function was using pj_strassign() to save the pointer
+of the pjproject transport local address to a local pj_str_t variable.  That
+variable was ultimately used to set the Contact header's uri->host and the SDP
+connection attribute's address again using pj_strassign.  pj_strassign() doesn't
+copy the actual value of the pj_str_t however, it just copies the pointer so
+if a connection-oriented transport is disconnected before the 200 OK with the
+SDP is sent, those pointers will be invalid which can cause use-after-free
+issues. To prevent this, filter_on_tx_message() now uses pj_strdup with the
+tdata->pool as the backing store to save the local IP address to the local
+variable.  pj_strassign() can then be used safely later on since the tdata
+will be available for the life of the transaction.
+
+Resolves: #GHSA-g8q2-p36q-94f6
+(cherry picked from commit b7ba85458796ef54b471017287c7806095dbda76)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/res/res_pjsip/pjsip_message_filter.c b/res/res_pjsip/pjsip_message_filter.c
+index 7f1b7d736c..4b7a5be75e 100644
+--- a/res/res_pjsip/pjsip_message_filter.c
++++ b/res/res_pjsip/pjsip_message_filter.c
+@@ -277,11 +277,11 @@ static pj_status_t filter_on_tx_message(pjsip_tx_data *tdata)
+ 
+ 		/* If the chosen transport is not bound to any we can't use the source address as it won't get back to us */
+ 		if (!is_bound_any(tdata->tp_info.transport)) {
+-			pj_strassign(&prm.ret_addr, &tdata->tp_info.transport->local_name.host);
++			pj_strdup(tdata->pool, &prm.ret_addr, &tdata->tp_info.transport->local_name.host);
+ 		}
+ 	} else {
+ 		/* The transport chosen will deliver this but ensure it is updated with the right information */
+-		pj_strassign(&prm.ret_addr, &tdata->tp_info.transport->local_name.host);
++		pj_strdup(tdata->pool, &prm.ret_addr, &tdata->tp_info.transport->local_name.host);
+ 	}
+ 
+ 	/* If the message needs to be updated with new address do so */

diff --git a/0008-res_rtp_asterisk.c-Address-2-potential-T.140-RED-buf.patch b/0008-res_rtp_asterisk.c-Address-2-potential-T.140-RED-buf.patch
new file mode 100644
index 0000000..2cce4df
--- /dev/null
+++ b/0008-res_rtp_asterisk.c-Address-2-potential-T.140-RED-buf.patch
@@ -0,0 +1,97 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Mon, 27 Apr 2026 08:29:29 -0600
+Subject: [PATCH] res_rtp_asterisk.c: Address 2 potential T.140 RED buffer
+ overruns.
+
+* Add check to red_t140_to_red() to ensure that the new primary payload
+can't cause the rtp_red->len array items to wrap or cause an overrun of
+the rtp_red->t140red_data buffer.
+
+* Add check to rtp_red_buffer() to ensure that a T.140 frame to be sent
+can't cause rtp_red->len array items to wrap or cause an overrun of
+the rtp_red->buf_data buffer.
+
+Resolves: #GHSA-vfhr-r9x9-c687
+Resolves: #GHSA-j2mm-57pq-jh94
+(cherry picked from commit 111487298a954a029daae941eac423f0609b1261)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
+index 028150f950..0ca1c1144d 100644
+--- a/res/res_rtp_asterisk.c
++++ b/res/res_rtp_asterisk.c
+@@ -5391,6 +5391,17 @@ static struct ast_frame *red_t140_to_red(struct rtp_red *red)
+ 	/* Store length of each generation and primary data length*/
+ 	for (i = 0; i < red->num_gen; i++)
+ 		red->len[i] = red->len[i+1];
++
++	/*
++	 * RED generation payload sizes are limited to 255 (UCHAR_MAX) bytes by virtue of
++	 * red->len being an array of usigned chars.  If the new primary payload exceeds that,
++	 * we're going to truncate it to 255.
++	 */
++	if (red->t140.datalen > UCHAR_MAX) {
++		ast_log(LOG_WARNING, "New T.140 frame of %d bytes exceeds max of %u. Discarding %d bytes.\n",
++			red->t140.datalen, UCHAR_MAX, red->t140.datalen - UCHAR_MAX);
++		red->t140.datalen = UCHAR_MAX;
++	}
+ 	red->len[i] = red->t140.datalen;
+ 
+ 	/* write each generation length in red header */
+@@ -9181,7 +9192,13 @@ static int rtp_red_init(struct ast_rtp_instance *instance, int buffer_time, int
+ 	return 0;
+ }
+ 
+-/*! \pre instance is locked */
++/*! \pre instance is locked
++ *
++ * \warning This code was written many years ago and it's unclear why we actually
++ * buffer OUTGOING T.140 text frames until a command is encountered but we do.
++ *
++ * This may change in the future.
++ */
+ static int rtp_red_buffer(struct ast_rtp_instance *instance, struct ast_frame *frame)
+ {
+ 	struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
+@@ -9192,6 +9209,8 @@ static int rtp_red_buffer(struct ast_rtp_instance *instance, struct ast_frame *f
+ 	}
+ 
+ 	if (frame->datalen > 0) {
++		int space_available = 0;
++
+ 		if (red->t140.datalen > 0) {
+ 			const unsigned char *primary = red->buf_data;
+ 
+@@ -9208,6 +9227,31 @@ static int rtp_red_buffer(struct ast_rtp_instance *instance, struct ast_frame *f
+ 			}
+ 		}
+ 
++		/*
++		 * RED generation payload sizes are limited to 255 (UCHAR_MAX) bytes by virtue of
++		 * red->len being an array of usigned chars.  If adding the current frame will
++		 * exceed that, we're going to flush the saved frame then try again. If the new
++		 * frame fits, great otherwise we're going to toss it.  Without understanding
++		 * the purpose of the buffering, that's all we can do now.
++		 */
++		space_available = UCHAR_MAX - red->t140.datalen;
++
++		if (frame->datalen > space_available) {
++			ast_rtp_write(instance, &rtp->red->t140);
++			/*
++			 * ast_rtp_write() calls red_t140_to_red() which resets red->t140.datalen
++			 * back to 0 so we now have UCHAR_MAX space available.
++			 */
++			space_available = UCHAR_MAX;
++		}
++
++		if (frame->datalen > space_available) {
++			ast_log(LOG_WARNING, "%s: T.140 frame of %d bytes exceeds max of %u. Discarding.\n",
++				ast_rtp_instance_get_channel_id(instance),
++				frame->datalen, UCHAR_MAX);
++			return -1;
++		}
++
+ 		memcpy(&red->buf_data[red->t140.datalen], frame->data.ptr, frame->datalen);
+ 		red->t140.datalen += frame->datalen;
+ 		red->t140.ts = frame->ts;

diff --git a/0009-res-res_pjsip_pubsub.c-Fix-buffer-over-read-in-MWI-b.patch b/0009-res-res_pjsip_pubsub.c-Fix-buffer-over-read-in-MWI-b.patch
new file mode 100644
index 0000000..ce853c0
--- /dev/null
+++ b/0009-res-res_pjsip_pubsub.c-Fix-buffer-over-read-in-MWI-b.patch
@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Roberto Paleari <r.paleari@reply.it>
+Date: Wed, 29 Apr 2026 14:18:31 +0200
+Subject: [PATCH] res/res_pjsip_pubsub.c: Fix buffer over-read in MWI body
+ parser
+
+Add constraint checks to prevent unauthenticated users from crashing Asterisk
+instance by sending a crafted inbound SIP NOTIFY request with "Content-Type:
+application/simple-message-summary".
+
+Resolves: #GHSA-8jw3-ccr9-xrmf
+(cherry picked from commit 57ce484a45b098de417f19265c95c64497782e36)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
+index 9bab0d6423..299cab2d2f 100644
+--- a/res/res_pjsip_pubsub.c
++++ b/res/res_pjsip_pubsub.c
+@@ -3663,6 +3663,7 @@ static pj_bool_t pubsub_on_rx_mwi_notify_request(pjsip_rx_data *rdata)
+ 	char *context;
+ 	char *body;
+ 	char *mailbox;
++	int body_len;
+ 	int rc;
+ 
+ 	endpoint = ast_pjsip_rdata_get_endpoint(rdata);
+@@ -3695,9 +3696,16 @@ static pj_bool_t pubsub_on_rx_mwi_notify_request(pjsip_rx_data *rdata)
+ 	context = atsign + 1;
+ 
+ 	body = ast_alloca(rdata->msg_info.msg->body->len + 1);
+-	rdata->msg_info.msg->body->print_body(rdata->msg_info.msg->body, body,
++	body_len = rdata->msg_info.msg->body->print_body(rdata->msg_info.msg->body, body,
+ 		rdata->msg_info.msg->body->len + 1);
+ 
++	if (body_len < 0 || body_len > rdata->msg_info.msg->body->len) {
++		ast_debug(1, "Incoming MWI: Endpoint: '%s' Unable to print request body\n", endpoint_name);
++		rc = 404;
++		goto error;
++	}
++	body[body_len] = '\0';
++
+ 	if (parse_simple_message_summary(body, &summary) != 0) {
+ 		ast_debug(1, "Incoming MWI: Endpoint: '%s' There was an issue getting message info from body '%s'\n",
+ 			ast_sorcery_object_get_id(endpoint), body);

diff --git a/0010-res_pjsip_pubsub-Add-width-limit-to-sscanf-in-MWI-NO.patch b/0010-res_pjsip_pubsub-Add-width-limit-to-sscanf-in-MWI-NO.patch
new file mode 100644
index 0000000..c1d0392
--- /dev/null
+++ b/0010-res_pjsip_pubsub-Add-width-limit-to-sscanf-in-MWI-NO.patch
@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Milan Kyselica <mil.kyselica@gmail.com>
+Date: Tue, 24 Mar 2026 19:22:02 +0100
+Subject: [PATCH] res_pjsip_pubsub: Add width limit to sscanf in MWI NOTIFY
+ parser
+
+The parse_simple_message_summary() function uses sscanf with an
+unbounded %s format specifier to parse the Message-Account field
+from incoming SIP NOTIFY bodies into a fixed-size 512-byte stack
+buffer (PJSIP_MAX_URL_SIZE). A single unauthenticated SIP NOTIFY
+with a Message-Account value exceeding 512 bytes overflows the
+buffer, corrupting adjacent stack data and permanently disabling
+the PJSIP transport layer without crashing the process.
+
+Add a width specifier (%511s) to limit the sscanf write to
+PJSIP_MAX_URL_SIZE - 1 bytes plus the NUL terminator, matching
+the destination buffer size.
+
+Resolves: #GHSA-589g-qgf8-m6mx
+(cherry picked from commit dca516f6d895e8867d48fa56b6ce7f05b6f7457a)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
+index 299cab2d2f..03d6ee9246 100644
+--- a/res/res_pjsip_pubsub.c
++++ b/res/res_pjsip_pubsub.c
+@@ -3647,7 +3647,7 @@ static int parse_simple_message_summary(char *body,
+ 			&summary->voice_messages_urgent_new, &summary->voice_messages_urgent_old)) {
+ 			found_counts = 1;
+ 		} else {
+-			sscanf(line, "message-account: %s", summary->message_account);
++			sscanf(line, "message-account: %511s", summary->message_account);
+ 		}
+ 	}
+ 

diff --git a/0011-manager-Use-remote-address-in-user-error-logging.patch b/0011-manager-Use-remote-address-in-user-error-logging.patch
new file mode 100644
index 0000000..301b500
--- /dev/null
+++ b/0011-manager-Use-remote-address-in-user-error-logging.patch
@@ -0,0 +1,34 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mike Bradeen <mbradeen@sangoma.com>
+Date: Mon, 30 Mar 2026 17:17:10 -0600
+Subject: [PATCH] manager: Use remote address in user error logging
+
+To avoid a potential null dereference use the remote address
+in error logging when there is no user or the user acl fails.
+
+Resolves: #GHSA-3rhj-hhw7-m6fw
+(cherry picked from commit 10c5b2efcacab03bf04a229f81cc24e76fe42c41)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/main/manager.c b/main/manager.c
+index fa3f395b44..060628aad6 100644
+--- a/main/manager.c
++++ b/main/manager.c
+@@ -8550,7 +8550,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser,
+ 	user = get_manager_by_name_locked(d.username);
+ 	if(!user) {
+ 		AST_RWLIST_UNLOCK(&users);
+-		ast_log(LOG_NOTICE, "%s tried to authenticate with nonexistent user '%s'\n", ast_sockaddr_stringify_addr(&session->addr), d.username);
++		ast_log(LOG_NOTICE, "%s tried to authenticate with nonexistent user '%s'\n", ast_sockaddr_stringify_addr(remote_address), d.username);
+ 		nonce = 0;
+ 		goto out_401;
+ 	}
+@@ -8558,7 +8558,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser,
+ 	/* --- We have User for this auth, now check ACL */
+ 	if (user->acl && !ast_apply_acl(user->acl, remote_address, "Manager User ACL:")) {
+ 		AST_RWLIST_UNLOCK(&users);
+-		ast_log(LOG_NOTICE, "%s failed to pass IP ACL as '%s'\n", ast_sockaddr_stringify_addr(&session->addr), d.username);
++		ast_log(LOG_NOTICE, "%s failed to pass IP ACL as '%s'\n", ast_sockaddr_stringify_addr(remote_address), d.username);
+ 		ast_http_request_close_on_completion(ser);
+ 		ast_http_error(ser, 403, "Permission denied", "Permission denied");
+ 		return 0;

diff --git a/0012-app_sms-Bound-protocol-1-SMS-unpacking-to-fixed-size.patch b/0012-app_sms-Bound-protocol-1-SMS-unpacking-to-fixed-size.patch
new file mode 100644
index 0000000..e58b2d1
--- /dev/null
+++ b/0012-app_sms-Bound-protocol-1-SMS-unpacking-to-fixed-size.patch
@@ -0,0 +1,243 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Pengpeng Hou <pengpeng@iscas.ac.cn>
+Date: Wed, 1 Apr 2026 20:20:10 +0800
+Subject: [PATCH] app_sms: Bound protocol 1 SMS unpacking to fixed-size buffers
+
+The protocol 1 unpack helpers trusted externally controlled lengths and wrote
+ them directly into fixed-size buffers in sms_t. Clamp the address, header,
+ and body copies to the destination array sizes so malformed messages cannot
+ overwrite adjacent state.
+
+Resolves: #GHSA-q9fr-m7g8-6ph5
+(cherry picked from commit 60f4ef3deac6b9af30519b46c13f103264038b82)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/apps/app_sms.c b/apps/app_sms.c
+index 0e379716dc..61d571094b 100644
+--- a/apps/app_sms.c
++++ b/apps/app_sms.c
+@@ -599,20 +599,28 @@ static struct timeval unpackdate(unsigned char *i)
+ /*! \brief unpacks bytes (7 bit encoding) at i, len l septets,
+ 	and places in udh and ud setting udhl and udl. udh not used
+ 	if udhi not set */
+-static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
++static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, size_t udh_size,
++	int *udhl, unsigned short *ud, size_t ud_size, int *udl, char udhi)
+ {
+ 	unsigned char b = 0, p = 0;
+ 	unsigned short *o = ud;
++	unsigned short *o_end = ud + ud_size;
++	unsigned char *h = udh;
++	unsigned char *h_end = udh + udh_size;
++	size_t stored_udhl = 0;
+ 	*udhl = 0;
+ 	if (udhi && l) {                        /* header */
+-		int h = i[p];
+-		*udhl = h;
+-		if (h) {
++		int hlen = i[p];
++		if (hlen) {
+ 			b = 1;
+ 			p++;
+ 			l--;
+-			while (h-- && l) {
+-				*udh++ = i[p++];
++			while (hlen-- && l) {
++				if (h < h_end) {
++					*h++ = i[p];
++					stored_udhl++;
++				}
++				p++;
+ 				b += 8;
+ 				while (b >= 7) {
+ 					b -= 7;
+@@ -644,57 +652,78 @@ static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, in
+ 		/* 0x00A0 is the encoding of ESC (27) in defaultalphabet */
+ 		if (o > ud && o[-1] == 0x00A0 && escapes[v]) {
+ 			o[-1] = escapes[v];
+-		} else {
++		} else if (o < o_end) {
+ 			*o++ = defaultalphabet[v];
+ 		}
+ 	}
+-	*udl = (o - ud);
++	*udl = o - ud;
++	*udhl = stored_udhl;
+ }
+ 
+ /*! \brief unpacks bytes (8 bit encoding) at i, len l septets,
+  *  and places in udh and ud setting udhl and udl. udh not used
+  *  if udhi not set.
+  */
+-static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
++static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, size_t udh_size,
++	int *udhl, unsigned short *ud, size_t ud_size, int *udl, char udhi)
+ {
+ 	unsigned short *o = ud;
++	unsigned short *o_end = ud + ud_size;
++	unsigned char *h = udh;
++	unsigned char *h_end = udh + udh_size;
++	size_t stored_udhl = 0;
+ 	*udhl = 0;
+ 	if (udhi) {
+ 		int n = *i;
+-		*udhl = n;
+ 		if (n) {
+ 			i++;
+ 			l--;
+ 			while (l && n) {
+ 				l--;
+ 				n--;
+-				*udh++ = *i++;
++				if (h < h_end) {
++					*h++ = *i;
++					stored_udhl++;
++				}
++				i++;
+ 			}
+ 		}
+ 	}
+ 	while (l--) {
+-		*o++ = *i++;                        /* not to UTF-8 as explicitly 8 bit coding in DCS */
++		if (o < o_end) {
++			*o++ = *i;               /* not to UTF-8 as explicitly 8 bit coding in DCS */
++		}
++		i++;
+ 	}
+-	*udl = (o - ud);
++	*udl = o - ud;
++	*udhl = stored_udhl;
+ }
+ 
+ /*! \brief unpacks bytes (16 bit encoding) at i, len l septets,
+-	 and places in udh and ud setting udhl and udl.
++	and places in udh and ud setting udhl and udl.
+ 	udh not used if udhi not set */
+-static void unpacksms16(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
++static void unpacksms16(unsigned char *i, unsigned char l, unsigned char *udh, size_t udh_size,
++	int *udhl, unsigned short *ud, size_t ud_size, int *udl, char udhi)
+ {
+ 	unsigned short *o = ud;
++	unsigned short *o_end = ud + ud_size;
++	unsigned char *h = udh;
++	unsigned char *h_end = udh + udh_size;
++	size_t stored_udhl = 0;
+ 	*udhl = 0;
+ 	if (udhi) {
+ 		int n = *i;
+-		*udhl = n;
+ 		if (n) {
+ 			i++;
+ 			l--;
+ 			while (l && n) {
+ 				l--;
+ 				n--;
+-				*udh++ = *i++;
++				if (h < h_end) {
++					*h++ = *i;
++					stored_udhl++;
++				}
++				i++;
+ 			}
+ 		}
+ 	}
+@@ -703,39 +732,54 @@ static void unpacksms16(unsigned char *i, unsigned char l, unsigned char *udh, i
+ 		if (l && l--) {
+ 			v = (v << 8) + *i++;
+ 		}
+-		*o++ = v;
++		if (o < o_end) {
++			*o++ = v;
++		}
+ 	}
+-	*udl = (o - ud);
++	*udl = o - ud;
++	*udhl = stored_udhl;
+ }
+ 
+ /*! \brief general unpack - starts with length byte (octet or septet) and returns number of bytes used, inc length */
+-static int unpacksms(unsigned char dcs, unsigned char *i, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
++static int unpacksms(unsigned char dcs, unsigned char *i, unsigned char *udh, size_t udh_size,
++	int *udhl, unsigned short *ud, size_t ud_size, int *udl, char udhi)
+ {
+ 	int l = *i++;
+ 	if (is7bit(dcs)) {
+-		unpacksms7(i, l, udh, udhl, ud, udl, udhi);
++		unpacksms7(i, l, udh, udh_size, udhl, ud, ud_size, udl, udhi);
+ 		l = (l * 7 + 7) / 8;                /* adjust length to return */
+ 	} else if (is8bit(dcs)) {
+-		unpacksms8(i, l, udh, udhl, ud, udl, udhi);
++		unpacksms8(i, l, udh, udh_size, udhl, ud, ud_size, udl, udhi);
+ 	} else {
+ 		l += l % 2;
+-		unpacksms16(i, l, udh, udhl, ud, udl, udhi);
++		unpacksms16(i, l, udh, udh_size, udhl, ud, ud_size, udl, udhi);
+ 	}
+ 	return l + 1;
+ }
+ 
+ /*! \brief unpack an address from i, return byte length, unpack to o */
+-static unsigned char unpackaddress(char *o, unsigned char *i)
++static unsigned char unpackaddress(char *o, size_t o_size, unsigned char *i)
+ {
+ 	unsigned char l = i[0], p;
++	char *o_end;
++
++	if (!o_size) {
++		return (l + 5) / 2;
++	}
++
++	o_end = o + o_size - 1;
+ 	if (i[1] == 0x91) {
+-		*o++ = '+';
++		if (o < o_end) {
++			*o++ = '+';
++		}
+ 	}
+ 	for (p = 0; p < l; p++) {
+-		if (p & 1) {
+-			*o++ = (i[2 + p / 2] >> 4) + '0';
+-		} else {
+-			*o++ = (i[2 + p / 2] & 0xF) + '0';
++		if (o < o_end) {
++			if (p & 1) {
++				*o++ = (i[2 + p / 2] >> 4) + '0';
++			} else {
++				*o++ = (i[2 + p / 2] & 0xF) + '0';
++			}
+ 		}
+ 	}
+ 	*o = 0;
+@@ -1122,7 +1166,7 @@ static unsigned char sms_handleincoming (sms_t * h)
+ 			ast_copy_string(h->oa, h->cli, sizeof(h->oa));
+ 			h->scts = ast_tvnow();
+ 			h->mr = h->imsg[p++];
+-			p += unpackaddress(h->da, h->imsg + p);
++			p += unpackaddress(h->da, ARRAY_LEN(h->da), h->imsg + p);
+ 			h->pid = h->imsg[p++];
+ 			h->dcs = h->imsg[p++];
+ 			if ((h->imsg[2] & 0x18) == 0x10) {       /* relative VP */
+@@ -1139,7 +1183,7 @@ static unsigned char sms_handleincoming (sms_t * h)
+ 			} else if (h->imsg[2] & 0x18) {
+ 				p += 7;                     /* ignore enhanced / absolute VP */
+ 			}
+-			p += unpacksms(h->dcs, h->imsg + p, h->udh, &h->udhl, h->ud, &h->udl, h->udhi);
++			p += unpacksms(h->dcs, h->imsg + p, h->udh, ARRAY_LEN(h->udh), &h->udhl, h->ud, ARRAY_LEN(h->ud), &h->udl, h->udhi);
+ 			h->rx = 1;                      /* received message */
+ 			sms_writefile(h);               /* write the file */
+ 			if (p != h->imsg[1] + 2) {
+@@ -1157,12 +1201,12 @@ static unsigned char sms_handleincoming (sms_t * h)
+ 			h->udhi = ((h->imsg[2] & 0x40) ? 1 : 0);
+ 			h->rp = ((h->imsg[2] & 0x80) ? 1 : 0);
+ 			h->mr = -1;
+-			p += unpackaddress(h->oa, h->imsg + p);
++			p += unpackaddress(h->oa, ARRAY_LEN(h->oa), h->imsg + p);
+ 			h->pid = h->imsg[p++];
+ 			h->dcs = h->imsg[p++];
+ 			h->scts = unpackdate(h->imsg + p);
+ 			p += 7;
+-			p += unpacksms(h->dcs, h->imsg + p, h->udh, &h->udhl, h->ud, &h->udl, h->udhi);
++			p += unpacksms(h->dcs, h->imsg + p, h->udh, ARRAY_LEN(h->udh), &h->udhl, h->ud, ARRAY_LEN(h->ud), &h->udl, h->udhi);
+ 			h->rx = 1;                      /* received message */
+ 			sms_writefile(h);               /* write the file */
+ 			if (p != h->imsg[1] + 2) {

diff --git a/0013-cel_pgsql-cel_tds-Escape-eventtype-field-to-prevent-.patch b/0013-cel_pgsql-cel_tds-Escape-eventtype-field-to-prevent-.patch
new file mode 100644
index 0000000..d5df58f
--- /dev/null
+++ b/0013-cel_pgsql-cel_tds-Escape-eventtype-field-to-prevent-.patch
@@ -0,0 +1,99 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Milan Kyselica <mil.kyselica@gmail.com>
+Date: Mon, 23 Mar 2026 15:18:48 +0100
+Subject: [PATCH] cel_pgsql, cel_tds: Escape eventtype field to prevent SQL
+ injection
+
+The eventtype column handler in cel_pgsql.c inserts
+record.user_defined_name directly into the SQL query without
+calling PQescapeStringConn(), while all other string fields in
+the same function are properly escaped. Similarly, cel_tds.c
+passes the raw user_defined_name into the SQL INSERT without
+routing it through anti_injection(), while all other fields are
+processed through that function.
+
+For cel_pgsql.c, escape the eventtype value using
+PQescapeStringConn(), matching the existing pattern used for all
+other string fields at lines 308-331 of the same function.
+
+For cel_tds.c, route the eventtype value through
+anti_injection() consistent with how all other fields are handled
+in the same function.
+
+Resolves: #GHSA-ph27-3m5q-mj5m
+(cherry picked from commit 8cb6dfd41debb2259ec3a33ccfa78f1d902e4c22)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c
+index 208bdd1f24..eb9bdbcd72 100644
+--- a/cel/cel_pgsql.c
++++ b/cel/cel_pgsql.c
+@@ -224,12 +224,25 @@ static void pgsql_log(struct ast_event *event)
+ 				} else {
+ 					/* Char field, probably */
+ 					const char *event_name;
++					size_t required_size;
+ 
+ 					event_name = (!cel_show_user_def
+ 						&& record.event_type == AST_CEL_USER_DEFINED)
+ 						? record.user_defined_name : record.event_name;
+-					LENGTHEN_BUF2(strlen(event_name) + 1);
+-					ast_str_append(&sql2, 0, "%s'%s'", SEP, event_name);
++					required_size = strlen(event_name) * 2 + 1;
++					if (required_size > bufsize) {
++						char *tmpbuf = ast_realloc(escapebuf, required_size);
++						if (!tmpbuf) {
++							AST_RWLIST_UNLOCK(&psql_columns);
++							goto ast_log_cleanup;
++						}
++						escapebuf = tmpbuf;
++						bufsize = required_size;
++					}
++					PQescapeStringConn(conn, escapebuf, event_name,
++						strlen(event_name), NULL);
++					LENGTHEN_BUF2(strlen(escapebuf) + 3);
++					ast_str_append(&sql2, 0, "%s'%s'", SEP, escapebuf);
+ 				}
+ 			} else if (strcmp(cur->name, "amaflags") == 0) {
+ 				if (strncmp(cur->type, "int", 3) == 0) {
+diff --git a/cel/cel_tds.c b/cel/cel_tds.c
+index 4b22ff1a48..d5c32184e4 100644
+--- a/cel/cel_tds.c
++++ b/cel/cel_tds.c
+@@ -110,7 +110,7 @@ static int mssql_disconnect(void);
+ static void tds_log(struct ast_event *event)
+ {
+ 	char start[80];
+-	char *accountcode_ai, *clidnum_ai, *exten_ai, *context_ai, *clid_ai, *channel_ai, *app_ai, *appdata_ai, *uniqueid_ai, *linkedid_ai, *cidani_ai, *cidrdnis_ai, *ciddnid_ai, *peer_ai, *userfield_ai;
++	char *accountcode_ai, *clidnum_ai, *exten_ai, *context_ai, *clid_ai, *channel_ai, *app_ai, *appdata_ai, *uniqueid_ai, *linkedid_ai, *cidani_ai, *cidrdnis_ai, *ciddnid_ai, *peer_ai, *userfield_ai, *eventtype_ai;
+ 	RETCODE erc;
+ 	int attempt = 1;
+ 	struct ast_cel_event_record record = {
+@@ -138,6 +138,9 @@ static void tds_log(struct ast_event *event)
+ 	linkedid_ai    = anti_injection(record.linked_id, 32);
+ 	userfield_ai   = anti_injection(record.user_field, 32);
+ 	peer_ai        = anti_injection(record.peer, 32);
++	eventtype_ai   = anti_injection(
++		(record.event_type == AST_CEL_USER_DEFINED)
++			? record.user_defined_name : record.event_name, 32);
+ 
+ 	get_date(start, sizeof(start), record.event_time);
+ 
+@@ -199,8 +202,7 @@ retry:
+ 		")",
+ 		settings->table, accountcode_ai, clidnum_ai, clid_ai, cidani_ai, cidrdnis_ai,
+ 		ciddnid_ai, exten_ai, context_ai, channel_ai, app_ai, appdata_ai, start,
+-		(record.event_type == AST_CEL_USER_DEFINED)
+-			? record.user_defined_name : record.event_name,
++		eventtype_ai,
+ 					ast_channel_amaflags2string(record.amaflag), uniqueid_ai, linkedid_ai,
+ 		userfield_ai, peer_ai);
+ 
+@@ -250,6 +252,7 @@ done:
+ 	ast_free(linkedid_ai);
+ 	ast_free(userfield_ai);
+ 	ast_free(peer_ai);
++	ast_free(eventtype_ai);
+ 
+ 	return;
+ }

diff --git a/0014-http-Escape-error-page-text-to-prevent-reflected-XSS.patch b/0014-http-Escape-error-page-text-to-prevent-reflected-XSS.patch
new file mode 100644
index 0000000..2ed5d50
--- /dev/null
+++ b/0014-http-Escape-error-page-text-to-prevent-reflected-XSS.patch
@@ -0,0 +1,54 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Milan Kyselica <mil.kyselica@gmail.com>
+Date: Wed, 8 Apr 2026 20:02:19 +0200
+Subject: [PATCH] http: Escape error page text to prevent reflected XSS
+
+The text parameter in ast_http_create_response() is inserted into
+the HTML body without escaping, while the server name on the same
+page is properly escaped via ast_xml_escape(). When res_phoneprov
+passes the decoded request URI as the text of a 404 response, HTML
+metacharacters in the URI are rendered by the browser.
+
+Apply ast_xml_escape() to the text parameter before inserting it
+into the HTML template, using the same function already used for
+the server name.
+
+Resolves: #GHSA-4pgv-j3mr-3rcp
+(cherry picked from commit e6998409f73f49959d0062c695bb9a2f611af5ac)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/main/http.c b/main/http.c
+index 80c00c52a1..1765887ec6 100644
+--- a/main/http.c
++++ b/main/http.c
+@@ -573,6 +573,7 @@ void ast_http_create_response(struct ast_tcptls_session_instance *ser, int statu
+ 	const char *status_title, struct ast_str *http_header_data, const char *text)
+ {
+ 	char server_name[MAX_SERVER_NAME_LENGTH];
++	char escaped_text[512];
+ 	struct ast_str *server_address = ast_str_create(MAX_SERVER_NAME_LENGTH);
+ 	struct ast_str *out = ast_str_create(INITIAL_RESPONSE_BODY_BUFFER);
+ 
+@@ -595,6 +596,13 @@ void ast_http_create_response(struct ast_tcptls_session_instance *ser, int statu
+ 	                server_name);
+ 	}
+ 
++	/* Escape text to prevent reflected XSS in error pages */
++	if (!ast_strlen_zero(text)) {
++		ast_xml_escape(text, escaped_text, sizeof(escaped_text));
++	} else {
++		escaped_text[0] = '\0';
++	}
++
+ 	ast_str_set(&out,
+ 	            0,
+ 	            "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n"
+@@ -609,7 +617,7 @@ void ast_http_create_response(struct ast_tcptls_session_instance *ser, int statu
+ 	            status_code,
+ 	            status_title,
+ 	            status_title,
+-	            text ? text : "",
++	            escaped_text,
+ 	            ast_str_buffer(server_address));
+ 
+ 	ast_free(server_address);

diff --git a/0015-format_ogg_speex-Add-bounds-check-to-prevent-heap-bu.patch b/0015-format_ogg_speex-Add-bounds-check-to-prevent-heap-bu.patch
new file mode 100644
index 0000000..d38c856
--- /dev/null
+++ b/0015-format_ogg_speex-Add-bounds-check-to-prevent-heap-bu.patch
@@ -0,0 +1,38 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Milan Kyselica <mil.kyselica@gmail.com>
+Date: Mon, 23 Mar 2026 15:15:18 +0100
+Subject: [PATCH] format_ogg_speex: Add bounds check to prevent heap buffer
+ overflow
+
+The ogg_speex_read() function copies OGG packet data via memcpy()
+without validating the packet size against the destination buffer
+(BUF_SIZE = 200 bytes). A crafted .spx file with an oversized OGG
+audio packet causes a heap buffer overflow that corrupts the
+adjacent speex_desc structure containing libogg heap pointers,
+leading to a crash (SIGSEGV) on playback.
+
+Add a bounds check for both negative and oversized values before
+the memcpy, consistent with how format_ogg_vorbis bounds its reads
+via ov_read().
+
+Resolves: #GHSA-8jhw-m2hg-vp3h
+(cherry picked from commit 0e6d761ed83f1671632c91805252767eae85e1a2)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/formats/format_ogg_speex.c b/formats/format_ogg_speex.c
+index 7dc95ab80a..cf5b7ec036 100644
+--- a/formats/format_ogg_speex.c
++++ b/formats/format_ogg_speex.c
+@@ -234,6 +234,12 @@ static struct ast_frame *ogg_speex_read(struct ast_filestream *fs,
+ 		return NULL;
+ 	}
+ 
++	if (s->op.bytes < 0 || s->op.bytes > BUF_SIZE) {
++		ast_log(LOG_WARNING, "OGG/Speex packet too large (%ld > %d), skipping\n",
++			s->op.bytes, BUF_SIZE);
++		return NULL;
++	}
++
+ 	AST_FRAME_SET_BUFFER(&fs->fr, fs->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
+ 	memcpy(fs->fr.data.ptr, s->op.packet, s->op.bytes);
+ 	fs->fr.datalen = s->op.bytes;

diff --git a/0016-ast_loggrabber-Install-the-ast_tsconvert.py-script-t.patch b/0016-ast_loggrabber-Install-the-ast_tsconvert.py-script-t.patch
new file mode 100644
index 0000000..e63d283
--- /dev/null
+++ b/0016-ast_loggrabber-Install-the-ast_tsconvert.py-script-t.patch
@@ -0,0 +1,57 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: ThatTotallyRealMyth
+ <106909154+ThatTotallyRealMyth@users.noreply.github.com>
+Date: Thu, 19 Mar 2026 09:40:57 +1100
+Subject: [PATCH] ast_loggrabber: Install the ast_tsconvert.py script to a
+ secure temp directory.
+
+The ast_tsconvert.py script called by ast_loggrabber is now installed in a
+temporary directory that isn't world readable or writable.
+
+Resolves: #GHSA-xgj6-2gc5-5x9c
+
+(cherry picked from commit f18ac4c964781f671e400342790bf40679698067)
+[Backport to 18.26.4: this version still extracted the helper with
+ egrep/tail into /tmp/.ast_tsconvert.py; replaced that with the
+ upstream install -m 0600 into the private mktemp -d directory.]
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+
+diff --git a/contrib/scripts/ast_loggrabber b/contrib/scripts/ast_loggrabber
+index b549ec329a..165272f1ce 100755
+--- a/contrib/scripts/ast_loggrabber
++++ b/contrib/scripts/ast_loggrabber
+@@ -175,17 +175,17 @@ fi
+ # Timestamp to use for output files
+ df=${tarball_uniqueid:-$(${DATEFORMAT})}
+ 
+-# Extract the Python timestamp conver script from the end of this
+-# script and save it to /tmp/.ast_tsconvert.py
+-
+-ss=`egrep -n "^#@@@SCRIPTSTART@@@" $0 |cut -f1 -d:`
+-tail -n +${ss} $0 >/tmp/.ast_tsconvert.py
+-
+ tmpdir=$(mktemp -d)
+ if [ -z "$tmpdir" ] ; then
+ 	echo "${prog}: Unable to create temporary directory."
+ 	exit 1
+ fi
++
++# Extract the Python timestamp conver script from the end of this
++# script and save it to the temporary directory
++
++install -m 0600 /dev/stdin "$tmpdir/.ast_tsconvert.py" < <(sed '1,/^#@@@SCRIPTSTART@@@/ d' "$0")
++
+ trap "rm -rf $tmpdir" EXIT
+ tardir=asterisk-${df}.logfiles
+ 
+@@ -197,7 +197,7 @@ for i in ${!LOGFILES[@]} ; do
+ 	mkdir -p "$destdir" 2>/dev/null || :
+ 	if [ -n "$LOG_DATEFORMAT" ] ; then
+ 		echo "Converting $lf"
+-		cat "$lf" | python /tmp/.ast_tsconvert.py --format="$LOG_DATEFORMAT" --timezone="$LOG_TIMEZONE" > "${destfile}"
++		cat "$lf" | python "$tmpdir/.ast_tsconvert.py" --format="$LOG_DATEFORMAT" --timezone="$LOG_TIMEZONE" > "${destfile}"
+ 	else
+ 		echo "Copying $lf"
+ 		cp "$lf" "${destfile}"

diff --git a/0017-ARI-Make-ARI-applications-respect-live_dangerously.patch b/0017-ARI-Make-ARI-applications-respect-live_dangerously.patch
new file mode 100644
index 0000000..fb4df1b
--- /dev/null
+++ b/0017-ARI-Make-ARI-applications-respect-live_dangerously.patch
@@ -0,0 +1,52 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Thu, 21 May 2026 07:55:01 -0600
+Subject: [PATCH] ARI: Make ARI applications respect live_dangerously.
+
+DeveloperNote: ARI applications can no longer call "dangerous" dialplan
+functions like DB(), FILE(), SHELL(), CURL(), STAT(), etc. without
+enabling "live_dangerously" in asterisk.conf.
+
+Resolves: #GHSA-vrfp-mg3q-3959
+(cherry picked from commit ba04e7f1f98887c3c6e0dc4ddce663021f7e948a)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/include/asterisk/stasis_app.h b/include/asterisk/stasis_app.h
+index 9a01ef33c3..548fb600f9 100644
+--- a/include/asterisk/stasis_app.h
++++ b/include/asterisk/stasis_app.h
+@@ -597,6 +597,11 @@ int stasis_app_control_answer(struct stasis_app_control *control);
+  * \param variable The name of the variable
+  * \param value The value to set the variable to
+  *
++ * \note The thread that actually does the set will have the inhibit_escalations
++ * flag set before the call to pbx_builtin_setvar_helper to prevent dangerous
++ * dialplan function execution from ARI.  The flag will be reset to its original
++ * state when pbx_builtin_setvar_helper returns.
++ *
+  * \return 0 for success.
+  * \return -1 for error.
+  */
+diff --git a/res/stasis/control.c b/res/stasis/control.c
+index dfbc007399..19ec7150ef 100644
+--- a/res/stasis/control.c
++++ b/res/stasis/control.c
+@@ -711,8 +711,18 @@ static int app_control_set_channel_var(struct stasis_app_control *control,
+ 	struct ast_channel *chan, void *data)
+ {
+ 	struct chanvar *var = data;
++	/*
++	 * Save the current inhibit state then enable it.
++	 */
++	int inhibited = ast_thread_inhibit_escalations_swap(1);
+ 
+ 	pbx_builtin_setvar_helper(control->channel, var->name, var->value);
++	/*
++	 * Re-enable it if it was originally enabled.
++	 */
++	if (inhibited > 0) {
++		ast_thread_inhibit_escalations();
++	}
+ 
+ 	return 0;
+ }

diff --git a/0018-res_config_ldap-Escape-LDAP-filter-values-per-RFC-45.patch b/0018-res_config_ldap-Escape-LDAP-filter-values-per-RFC-45.patch
new file mode 100644
index 0000000..e9ca6a1
--- /dev/null
+++ b/0018-res_config_ldap-Escape-LDAP-filter-values-per-RFC-45.patch
@@ -0,0 +1,107 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Milan Kyselica <mil.kyselica@gmail.com>
+Date: Mon, 23 Mar 2026 15:20:27 +0100
+Subject: [PATCH] res_config_ldap: Escape LDAP filter values per RFC 4515
+
+The LDAP realtime driver constructs search filters by directly
+concatenating user-supplied values without RFC 4515 escaping.
+When LDAP is used as a realtime backend for endpoint
+identification, characters with special meaning in LDAP filters
+(*, (, ), \) can be injected via the SIP From header username.
+
+Add ldap_filter_escape_value() that escapes RFC 4515 special
+characters to their \HH hex representation, and apply it to
+non-LIKE query values. The LIKE query path preserves the existing
+wildcard conversion behavior with a note for maintainers.
+
+Resolves: #GHSA-r6c2-hwc2-j4mp
+(cherry picked from commit 7e1ae09594a101950398cc6aff2dd2e5ab314884)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
+index a49663a1c2..bc49a76cca 100644
+--- a/res/res_config_ldap.c
++++ b/res/res_config_ldap.c
+@@ -733,6 +733,40 @@ static int replace_string_in_string(char *string, const char *search, const char
+ 	return replaced;
+ }
+ 
++/*!
++ * \internal
++ * \brief Escape a value for safe inclusion in an LDAP filter per RFC 4515.
++ *
++ * Characters that have special meaning in LDAP filters are escaped
++ * to their \\HH hex representation: * ( ) \\ and NUL.
++ *
++ * \param value The raw value to escape
++ * \param escaped Output buffer (caller-allocated ast_str)
++ */
++static void ldap_filter_escape_value(const char *value, struct ast_str **escaped)
++{
++	ast_str_reset(*escaped);
++	for (; *value; value++) {
++		switch (*value) {
++		case '*':
++			ast_str_append(escaped, 0, "\\2a");
++			break;
++		case '(':
++			ast_str_append(escaped, 0, "\\28");
++			break;
++		case ')':
++			ast_str_append(escaped, 0, "\\29");
++			break;
++		case '\\':
++			ast_str_append(escaped, 0, "\\5c");
++			break;
++		default:
++			ast_str_append(escaped, 0, "%c", *value);
++			break;
++		}
++	}
++}
++
+ /*! \brief Append a name=value filter string. The filter string can grow.
+  */
+ static void append_var_and_value_to_filter(struct ast_str **filter,
+@@ -741,10 +775,16 @@ static void append_var_and_value_to_filter(struct ast_str **filter,
+ {
+ 	char *new_name = NULL;
+ 	char *new_value = NULL;
+-	char *like_pos = strstr(name, " LIKE");
++	const char *like_pos = strstr(name, " LIKE");
++	struct ast_str *escaped_value;
+ 
+ 	ast_debug(2, "name='%s' value='%s'\n", name, value);
+ 
++	escaped_value = ast_str_create(256);
++	if (!escaped_value) {
++		return;
++	}
++
+ 	if (like_pos) {
+ 		int len = like_pos - name;
+ 
+@@ -753,11 +793,20 @@ static void append_var_and_value_to_filter(struct ast_str **filter,
+ 		value = new_value = ast_strdupa(value);
+ 		replace_string_in_string(new_value, "\\_", "_");
+ 		replace_string_in_string(new_value, "%", "*");
++		name = convert_attribute_name_to_ldap(table_config, name);
++		/* Note: The LIKE path preserves original wildcard behavior.
++		 * A more comprehensive escaping of the LIKE path is left
++		 * to the maintainers familiar with the query semantics.
++		 */
++		ast_str_append(filter, 0, "(%s=%s)", name, value);
++	} else {
++		name = convert_attribute_name_to_ldap(table_config, name);
++		ldap_filter_escape_value(value, &escaped_value);
++		ast_str_append(filter, 0, "(%s=%s)", name,
++			ast_str_buffer(escaped_value));
+ 	}
+ 
+-	name = convert_attribute_name_to_ldap(table_config, name);
+-
+-	ast_str_append(filter, 0, "(%s=%s)", name, value);
++	ast_free(escaped_value);
+ }
+ 
+ /*!

diff --git a/0019-ast_coredumper-create-gdbinit-file-with-restrictive-.patch b/0019-ast_coredumper-create-gdbinit-file-with-restrictive-.patch
new file mode 100644
index 0000000..9cd0292
--- /dev/null
+++ b/0019-ast_coredumper-create-gdbinit-file-with-restrictive-.patch
@@ -0,0 +1,68 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mike Bradeen <mbradeen@sangoma.com>
+Date: Thu, 15 Jan 2026 12:43:22 -0700
+Subject: [PATCH] ast_coredumper: create gdbinit file with restrictive
+ permissions
+
+Modify gdbinit to use the install command with explicit permissions (-m 600)
+when creating the .ast_coredumper.gdbinit file. This ensures the file is
+created with restricted permissions (readable/writable only by the owner)
+to avoid potential privilege escalation.
+
+Resolves: #GHSA-xpc6-x892-v83c
+(cherry picked from commit 97d3df9cf7a4128208281faa4a53ca7dfd1c39a1)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
+index 269d5c61da..8c63cd2bf7 100755
+--- a/contrib/scripts/ast_coredumper
++++ b/contrib/scripts/ast_coredumper
+@@ -117,6 +117,7 @@ if $RUNNING ; then
+ 		if ${DRY_RUN} ; then
+ 			echo "Would run: ${GDB} -p $MAIN_PID -q --batch --ex gcore $cf"
+ 		else
++			install -m 0600 /dev/null "$cf"
+ 			${GDB} -p "$MAIN_PID" -q --batch --ex "gcore $cf" >/dev/null 2>&1
+ 		fi
+ 		echo "$(S_COR "${DRY_RUN}" 'Simulated dump' 'Dump') is complete."
+@@ -245,7 +246,7 @@ fi
+ 
+ gdbinit=${OUTPUTDIR}/.ast_coredumper.gdbinit
+ trap 'rm $gdbinit' EXIT
+-sed '1,/^#@@@SCRIPTSTART@@@/ d' "$0" >"$gdbinit"
++install -m 600 /dev/stdin "$gdbinit" < <(sed '1,/^#@@@SCRIPTSTART@@@/ d' "$0")
+ 
+ # Now iterate over the coredumps and dump the debugging info
+ for i in "${!COREDUMPS[@]}" ; do
+@@ -295,6 +296,7 @@ for i in "${!COREDUMPS[@]}" ; do
+ 				of=${OUTPUTDIR}/${cfname}-${BASH_REMATCH[1]}
+ 				of=${of//:/-}
+ 				rm -f "$of"
++				install -m 0600 /dev/null "$of"
+ 				msg "    Creating $of"
+ 			fi
+ 			echo -e $"$line" >> "$of"
+@@ -313,6 +315,7 @@ for i in "${!COREDUMPS[@]}" ; do
+ 		rm -rf "${dest}" 2>/dev/null || :
+ 
+ 		astbindir=$(dirname "${astbin}")
++		install -m 0700 -d "${dest}"
+ 		mkdir -p "${dest}/tmp" "${dest}/${moddir}" "${dest}/etc" \
+ 		"${dest}/${etcdir}" "${dest}/${libdir}" "${dest}/${astbindir}"
+ 
+@@ -337,6 +340,7 @@ for i in "${!COREDUMPS[@]}" ; do
+ 		cp -a "${astbin}" "${dest}/${astbin}"
+ 		rm -rf "${tf}"
+ 		msg "    Creating ${tf}"
++		install -m 0600 /dev/null "$tf"
+ 		tar -chzf "${tf}" --transform="s/^[.]/${cfname}.output/" -C "${dest}" .
+ 		sleep 3
+ 		rm -rf "${dest}"
+@@ -350,6 +354,7 @@ for i in "${!COREDUMPS[@]}" ; do
+ 		rm -rf "${dest}" 2>/dev/null || :
+ 		mkdir -p "${dest}"
+ 		cp "${OUTPUTDIR}/${cfname}"*.txt "${dest}/"
++		install -m 0600 /dev/null "$tf"
+ 		tar -chzf "${tf}" --transform="s/^[.]/${cfname}/" -C "${dest}" .
+ 		rm -rf "${dest}"
+ 		echo "Created $tf"

diff --git a/0020-http.c-Change-httpstatus-to-default-disabled-and-san.patch b/0020-http.c-Change-httpstatus-to-default-disabled-and-san.patch
new file mode 100644
index 0000000..9e69ac6
--- /dev/null
+++ b/0020-http.c-Change-httpstatus-to-default-disabled-and-san.patch
@@ -0,0 +1,106 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Thu, 15 Jan 2026 11:46:21 -0700
+Subject: [PATCH] http.c: Change httpstatus to default disabled and sanitize
+ output.
+
+To address potential security issues, the httpstatus page is now disabled
+by default and the echoed query string and cookie output is html-escaped.
+
+Resolves: #GHSA-v6hp-wh3r-cwxh
+
+UpgradeNote: To prevent possible security issues, the `/httpstatus` page
+served by the internal web server is now disabled by default.  To explicitly
+enable it, set `enable_status=yes` in http.conf.
+
+(cherry picked from commit 444be00e0593c733cf81716a00c35f6af8ff3d31)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/configs/samples/http.conf.sample b/configs/samples/http.conf.sample
+index 1920a1c920..bd9794c5a9 100644
+--- a/configs/samples/http.conf.sample
++++ b/configs/samples/http.conf.sample
+@@ -69,9 +69,9 @@ bindaddr=127.0.0.1
+ ;
+ ; Whether Asterisk should serve a status page showing the running
+ ; configuration of this built-in HTTP server.
+-; Default is yes.
++; Default is no.
+ ;
+-;enable_status=no
++;enable_status=yes
+ ;
+ ; Redirect one URI to another.  This is how you would set a
+ ; default page.
+diff --git a/main/http.c b/main/http.c
+index 1765887ec6..88e697755e 100644
+--- a/main/http.c
++++ b/main/http.c
+@@ -368,6 +368,34 @@ out403:
+ 	return 0;
+ }
+ 
++static void str_append_escaped(struct ast_str **str, const char *in)
++{
++	const char *cur = in;
++
++	while(*cur) {
++		switch (*cur) {
++		case '<':
++			ast_str_append(str, 0, "&lt;");
++			break;
++		case '>':
++			ast_str_append(str, 0, "&gt;");
++			break;
++		case '&':
++			ast_str_append(str, 0, "&amp;");
++			break;
++		case '"':
++			ast_str_append(str, 0, "&quot;");
++			break;
++		default:
++			ast_str_append(str, 0, "%c", *cur);
++			break;
++		}
++		cur++;
++	}
++
++	return;
++}
++
+ static int httpstatus_callback(struct ast_tcptls_session_instance *ser,
+ 	const struct ast_http_uri *urih, const char *uri,
+ 	enum ast_http_method method, struct ast_variable *get_vars,
+@@ -408,13 +436,21 @@ static int httpstatus_callback(struct ast_tcptls_session_instance *ser,
+ 	}
+ 	ast_str_append(&out, 0, "<tr><td colspan=\"2\"><hr></td></tr>\r\n");
+ 	for (v = get_vars; v; v = v->next) {
+-		ast_str_append(&out, 0, "<tr><td><i>Submitted GET Variable '%s'</i></td><td>%s</td></tr>\r\n", v->name, v->value);
++		ast_str_append(&out, 0, "<tr><td><i>Submitted GET Variable '");
++		str_append_escaped(&out, v->name);
++		ast_str_append(&out, 0, "'</i></td><td>");
++		str_append_escaped(&out, v->value);
++		ast_str_append(&out, 0, "</td></tr>\r\n");
+ 	}
+ 	ast_str_append(&out, 0, "<tr><td colspan=\"2\"><hr></td></tr>\r\n");
+ 
+ 	cookies = ast_http_get_cookies(headers);
+ 	for (v = cookies; v; v = v->next) {
+-		ast_str_append(&out, 0, "<tr><td><i>Cookie '%s'</i></td><td>%s</td></tr>\r\n", v->name, v->value);
++		ast_str_append(&out, 0, "<tr><td><i>Cookie '");
++		str_append_escaped(&out, v->name);
++		ast_str_append(&out, 0, "'</i></td><td>");
++		str_append_escaped(&out, v->value);
++		ast_str_append(&out, 0, "</td></tr>\r\n");
+ 	}
+ 	ast_variables_destroy(cookies);
+ 
+@@ -2380,7 +2416,7 @@ static int __ast_http_load(int reload)
+ 	struct ast_variable *v;
+ 	int enabled = 0;
+ 	int new_static_uri_enabled = 0;
+-	int new_status_uri_enabled = 1; /* Default to enabled for BC */
++	int new_status_uri_enabled = 0;
+ 	char newprefix[MAX_PREFIX] = "";
+ 	char server_name[MAX_SERVER_NAME_LENGTH];
+ 	struct http_uri_redirect *redirect;

diff --git a/0021-ast_coredumper-check-ast_debug_tools.conf-permission.patch b/0021-ast_coredumper-check-ast_debug_tools.conf-permission.patch
new file mode 100644
index 0000000..1784045
--- /dev/null
+++ b/0021-ast_coredumper-check-ast_debug_tools.conf-permission.patch
@@ -0,0 +1,206 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mike Bradeen <mbradeen@sangoma.com>
+Date: Thu, 15 Jan 2026 13:52:30 -0700
+Subject: [PATCH] ast_coredumper: check ast_debug_tools.conf permissions
+
+Prevent ast_coredumper from using ast_debug_tools.conf files that are
+not owned by root or are writable by other users or groups.
+
+Prevent ast_logescalator and ast_loggrabber from doing the same if
+they are run as root.
+
+Resolves: #GHSA-rvch-3jmx-3jf3
+
+UserNote: ast_debug_tools.conf must be owned by root and not be
+writable by other users or groups to be used by ast_coredumper or
+by ast_logescalator or ast_loggrabber when run as root.
+
+(cherry picked from commit dc5e7418a359c4367331e57095c41a40f1425c30)
+[Backport to 18.26.4: applied after the later ast_loggrabber temp
+ directory fix (f18ac4c964), so the ast_loggrabber hunk that writes
+ /tmp/.ast_tsconvert.py was dropped in favour of the $tmpdir version.]
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+
+diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
+index 8c63cd2bf7..6a57ac0a9d 100755
+--- a/contrib/scripts/ast_coredumper
++++ b/contrib/scripts/ast_coredumper
+@@ -42,11 +42,9 @@ COMMANDLINE_COREDUMPS=false
+ 
+ # Read config files from most important to least important.
+ # Variables set on the command line or environment always take precedence.
+-# shellcheck disable=SC1091
+-[ -f ./ast_debug_tools.conf ] && source ./ast_debug_tools.conf
+-# shellcheck disable=SC1090
+-[ -f ~/ast_debug_tools.conf ] && source ~/ast_debug_tools.conf
+-[ -f /etc/asterisk/ast_debug_tools.conf ] && source /etc/asterisk/ast_debug_tools.conf
++safe_source_config ./ast_debug_tools.conf
++safe_source_config ~/ast_debug_tools.conf
++safe_source_config /etc/asterisk/ast_debug_tools.conf
+ 
+ if [ -n "${DATEFORMAT}" ] ; then
+ 	err <<-EOF
+@@ -435,6 +433,43 @@ check_gdb() {
+ 	fi
+ }
+ 
++# Function to safely source a config file with security checks
++# This prevents privilege escalation by ensuring config files are
++# owned by root and not writable by group or others
++safe_source_config() {
++	local config_file="$1"
++
++	# Return if file doesn't exist
++	[ -f "$config_file" ] || return 0
++
++	# Get the absolute path
++	config_file=$(readlink -f "$config_file")
++
++	# Get file owner UID and permissions
++	local file_stat
++	file_stat=$(stat -c "%u %a" "$config_file" 2>/dev/null) || return 0
++	local owner_uid=${file_stat%% *}
++	local perms=${file_stat##* }
++
++	# File must be owned by root (UID 0)
++	if [ "$owner_uid" -ne 0 ]; then
++		err "Config file $config_file is not owned by root. Skipping for security." >&2
++		return 1
++	fi
++
++	# File must not be writable by group or others (check group-write and other-write bits)
++	# Extract the group and other permission digits
++	local group_perms=$((perms / 10 % 10))
++	local other_perms=$((perms % 10))
++
++	if [ $((group_perms & 2)) -ne 0 ] || [ $((other_perms & 2)) -ne 0 ]; then
++		err "Config file $config_file is writable by group or others. Skipping for security." >&2
++		return 1
++	fi
++
++	source "$config_file"
++}
++
+ # shellcheck disable=SC2317
+ find_pid() {
+ 	if [ -n "$PID" ] ; then
+diff --git a/contrib/scripts/ast_logescalator b/contrib/scripts/ast_logescalator
+index 054ef9b9c0..ea3d15e429 100755
+--- a/contrib/scripts/ast_logescalator
++++ b/contrib/scripts/ast_logescalator
+@@ -128,10 +128,51 @@ declare -A DEBUG_COMMANDS=(
+ VERBOSE_LEVELS="NOTICE,WARNING,ERROR,VERBOSE"
+ DEBUG_LEVELS="DEBUG"
+ 
++# Function to safely source a config file with security checks
++# This prevents privilege escalation by ensuring config files are
++# owned by root and not writable by group or others when running as root
++safe_source_config() {
++	local config_file="$1"
++
++	# Return if file doesn't exist
++	[ -f "$config_file" ] || return 0
++
++	# Get the absolute path
++	config_file=$(readlink -f "$config_file")
++
++	# Check if running as root (effective UID is 0)
++	if [ $EUID -eq 0 ]; then
++		# Running as root - apply strict security checks
++		# Get file owner UID and permissions
++		local file_stat
++		file_stat=$(stat -c "%u %a" "$config_file" 2>/dev/null) || return 0
++		local owner_uid=${file_stat%% *}
++		local perms=${file_stat##* }
++
++		# File must be owned by root (UID 0)
++		if [ "$owner_uid" -ne 0 ]; then
++			echo "WARNING: Config file $config_file is not owned by root. Skipping for security." >&2
++			return 1
++		fi
++
++		# File must not be writable by group or others (check group-write and other-write bits)
++		# Extract the group and other permission digits
++		local group_perms=$((perms / 10 % 10))
++		local other_perms=$((perms % 10))
++
++		if [ $((group_perms & 2)) -ne 0 ] || [ $((other_perms & 2)) -ne 0 ]; then
++			echo "WARNING: Config file $config_file is writable by group or others. Skipping for security." >&2
++			return 1
++		fi
++	fi
++
++	source "$config_file"
++}
++
+ # Read config files from least important to most important
+-[ -f /etc/asterisk/ast_debug_tools.conf ] && source /etc/asterisk/ast_debug_tools.conf
+-[ -f ~/ast_debug_tools.conf ] && source ~/ast_debug_tools.conf
+-[ -f ./ast_debug_tools.conf ] && source ./ast_debug_tools.conf
++safe_source_config /etc/asterisk/ast_debug_tools.conf
++safe_source_config ~/ast_debug_tools.conf
++safe_source_config ./ast_debug_tools.conf
+ 
+ DATEFORMAT=${DATEFORMAT:-'date +%FT%H-%M-%S%z'}
+ UNIQUEID=$($DATEFORMAT)
+diff --git a/contrib/scripts/ast_loggrabber b/contrib/scripts/ast_loggrabber
+index 165272f1ce..90beaaa761 100755
+--- a/contrib/scripts/ast_loggrabber
++++ b/contrib/scripts/ast_loggrabber
+@@ -101,10 +101,51 @@ append_logfiles=false
+ declare -a LOGFILES
+ declare -a ARGS_LOGFILES
+ 
++# Function to safely source a config file with security checks
++# This prevents privilege escalation by ensuring config files are
++# owned by root and not writable by group or others when running as root
++safe_source_config() {
++	local config_file="$1"
++
++	# Return if file doesn't exist
++	[ -f "$config_file" ] || return 0
++
++	# Get the absolute path
++	config_file=$(readlink -f "$config_file")
++
++	# Check if running as root (effective UID is 0)
++	if [ $EUID -eq 0 ]; then
++		# Running as root - apply strict security checks
++		# Get file owner UID and permissions
++		local file_stat
++		file_stat=$(stat -c "%u %a" "$config_file" 2>/dev/null) || return 0
++		local owner_uid=${file_stat%% *}
++		local perms=${file_stat##* }
++
++		# File must be owned by root (UID 0)
++		if [ "$owner_uid" -ne 0 ]; then
++			echo "WARNING: Config file $config_file is not owned by root. Skipping for security." >&2
++			return 1
++		fi
++
++		# File must not be writable by group or others (check group-write and other-write bits)
++		# Extract the group and other permission digits
++		local group_perms=$((perms / 10 % 10))
++		local other_perms=$((perms % 10))
++
++		if [ $((group_perms & 2)) -ne 0 ] || [ $((other_perms & 2)) -ne 0 ]; then
++			echo "WARNING: Config file $config_file is writable by group or others. Skipping for security." >&2
++			return 1
++		fi
++	fi
++
++	source "$config_file"
++}
++
+ # Read config files from least important to most important
+-[ -f /etc/asterisk/ast_debug_tools.conf ] && source /etc/asterisk/ast_debug_tools.conf
+-[ -f ~/ast_debug_tools.conf ] && source ~/ast_debug_tools.conf
+-[ -f ./ast_debug_tools.conf ] && source ./ast_debug_tools.conf
++safe_source_config /etc/asterisk/ast_debug_tools.conf
++safe_source_config ~/ast_debug_tools.conf
++safe_source_config ./ast_debug_tools.conf
+ 
+ if [ ${#LOGFILES[@]} -eq 0 ] ; then
+ 	LOGFILES+=(/var/log/asterisk/messages* /var/log/asterisk/queue* \

diff --git a/0022-xml.c-Replace-XML_PARSE_NOENT-with-XML_PARSE_NONET-f.patch b/0022-xml.c-Replace-XML_PARSE_NOENT-with-XML_PARSE_NONET-f.patch
new file mode 100644
index 0000000..9c32a74
--- /dev/null
+++ b/0022-xml.c-Replace-XML_PARSE_NOENT-with-XML_PARSE_NONET-f.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: George Joseph <gjoseph@sangoma.com>
+Date: Thu, 15 Jan 2026 08:38:26 -0700
+Subject: [PATCH] xml.c: Replace XML_PARSE_NOENT with XML_PARSE_NONET for
+ xmlReadFile.
+
+The xmlReadFile XML_PARSE_NOENT flag, which allows parsing of external
+entities, could allow a potential XXE injection attack.  Replacing it with
+XML_PARSE_NONET, which prevents network access, is safer.
+
+Resolves: #GHSA-85x7-54wr-vh42
+(cherry picked from commit 640677c9d81eeaa10928e6acc115a7e768cfbf1b)
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+
+diff --git a/main/xml.c b/main/xml.c
+index bd4c59f5de..371691ce66 100644
+--- a/main/xml.c
++++ b/main/xml.c
+@@ -99,7 +99,7 @@ struct ast_xml_doc *ast_xml_open(char *filename)
+ 		return NULL;
+ 	}
+ 
+-	doc = xmlReadFile(filename, NULL, XML_PARSE_RECOVER | XML_PARSE_NOENT);
++	doc = xmlReadFile(filename, NULL, XML_PARSE_RECOVER | XML_PARSE_NONET);
+ 	if (!doc) {
+ 		return NULL;
+ 	}
+@@ -503,7 +503,7 @@ struct ast_xslt_doc *ast_xslt_open(char *filename)
+ 	xsltStylesheet *xslt;
+ 	xmlDoc *xml;
+ 
+-	xml = xmlReadFile(filename, NULL, XML_PARSE_RECOVER | XML_PARSE_NOENT);
++	xml = xmlReadFile(filename, NULL, XML_PARSE_RECOVER | XML_PARSE_NONET);
+ 	if (!xml) {
+ 		return NULL;
+ 	}
+@@ -531,7 +531,7 @@ struct ast_xslt_doc *ast_xslt_read_memory(char *buffer, size_t size)
+ 		return NULL;
+ 	}
+ 
+-	doc = xmlReadMemory(buffer, (int) size, NULL, NULL, XML_PARSE_RECOVER | XML_PARSE_NOENT);
++	doc = xmlReadMemory(buffer, (int) size, NULL, NULL, XML_PARSE_RECOVER | XML_PARSE_NONET);
+ 	if (!doc) {
+ 		return NULL;
+ 	}

diff --git a/asterisk-16.1.0-explicit-python3.patch b/asterisk-16.1.0-explicit-python3.patch
deleted file mode 100644
index 522552f..0000000
--- a/asterisk-16.1.0-explicit-python3.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jared Smith <jsmith@fedoraproject.org>
-Date: Fri, 15 Nov 2019 07:59:29 -0500
-Subject: [PATCH] Update from python2 to python3 for various scripts
-
-
-diff --git a/build_tools/get_documentation.py b/build_tools/get_documentation.py
-index 3211896460..41d1689955 100644
---- a/build_tools/get_documentation.py
-+++ b/build_tools/get_documentation.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python3
- # vin: sw=3 et:
- '''
- Copyright (C) 2012, Digium, Inc.
-diff --git a/build_tools/post_process_documentation.py b/build_tools/post_process_documentation.py
-index c1496beabf..aeb3e68ad4 100644
---- a/build_tools/post_process_documentation.py
-+++ b/build_tools/post_process_documentation.py
-@@ -1,4 +1,4 @@
--#! /usr/bin/env python
-+#!/usr/bin/python3
- # vin: sw=3 et:
- '''
- Copyright (C) 2012, Digium, Inc.
-diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper
-index d0bad282de..269d5c61da 100755
---- a/contrib/scripts/ast_coredumper
-+++ b/contrib/scripts/ast_coredumper
-@@ -421,7 +421,7 @@ check_gdb() {
- 		EOF
- 	fi
- 
--	result=$($GDB --batch --ex "python print('hello')" 2>/dev/null || : )
-+	result=$($GDB --batch --ex "python2 print('hello')" 2>/dev/null || : )
- 	if [[ ! "$result" =~ ^hello$ ]] ; then
- 		die -2 <<-EOF
- 		$GDB does not support python.
-diff --git a/contrib/scripts/refcounter.py b/contrib/scripts/refcounter.py
-index 146a024c90..807623b4bc 100755
---- a/contrib/scripts/refcounter.py
-+++ b/contrib/scripts/refcounter.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Process a ref debug log
- 
-  This file will process a log file created by enabling
-diff --git a/contrib/scripts/reflocks.py b/contrib/scripts/reflocks.py
-index db1985f8a5..29144a4f02 100755
---- a/contrib/scripts/reflocks.py
-+++ b/contrib/scripts/reflocks.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Process a ref debug log for lock usage
- 
-  This file will process a log file created by Asterisk
-diff --git a/contrib/scripts/refstats.py b/contrib/scripts/refstats.py
-index 93df02f64a..3df82834d4 100755
---- a/contrib/scripts/refstats.py
-+++ b/contrib/scripts/refstats.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Process a ref debug log for memory usage
- 
-  This will provide information about total and peak
-diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
-index 10f6b33d1b..b4be16af1c 100755
---- a/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
-+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsip.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- 
- from __future__ import print_function
- 
-diff --git a/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py b/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
-index 2469ffc9fe..9492747cc3 100755
---- a/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
-+++ b/contrib/scripts/sip_to_pjsip/sip_to_pjsql.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- 
- from sip_to_pjsip import convert
- import sip_to_pjsip
-diff --git a/contrib/scripts/spandspflow2pcap.py b/contrib/scripts/spandspflow2pcap.py
-index 442e15fb9c..687db83dbe 100644
---- a/contrib/scripts/spandspflow2pcap.py
-+++ b/contrib/scripts/spandspflow2pcap.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- # vim: set ts=8 sw=4 sts=4 et ai tw=79:
- '''
- Usage: ./spandspflow2pcap.py SPANDSP_LOG SENDFAX_PCAP
-diff --git a/contrib/scripts/voicemailpwcheck.py b/contrib/scripts/voicemailpwcheck.py
-index 7636df3127..77203099c1 100755
---- a/contrib/scripts/voicemailpwcheck.py
-+++ b/contrib/scripts/voicemailpwcheck.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- ''' Sample externpasscheck script for use with voicemail.conf
- 
- Copyright (C) 2010, Digium, Inc.
-diff --git a/rest-api-templates/make_ari_stubs.py b/rest-api-templates/make_ari_stubs.py
-index 644f819041..ae1b9d6f3c 100755
---- a/rest-api-templates/make_ari_stubs.py
-+++ b/rest-api-templates/make_ari_stubs.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- # Asterisk -- An open source telephony toolkit.
- #
- # Copyright (C) 2013, Digium, Inc.

diff --git a/asterisk-18.12.1-ilbc_macros.patch b/asterisk-18.12.1-ilbc_macros.patch
deleted file mode 100644
index 01946be..0000000
--- a/asterisk-18.12.1-ilbc_macros.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
-Date: Wed, 15 Jun 2022 17:40:46 +0200
-Subject: [PATCH] handle ilbc v3 errors
-
-
-diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
-index 536d68026e..c75cbb7a48 100644
---- a/codecs/codec_ilbc.c
-+++ b/codecs/codec_ilbc.c
-@@ -45,6 +45,11 @@
- typedef uint16_t ilbc_bytes;
- typedef int16_t  ilbc_block;
- #define BUF_TYPE i16
-+/* In the ilbc library were removed RFC 3951 compatibility macros */
-+#define initDecode WebRtcIlbcfix_InitDecode
-+#define initEncode WebRtcIlbcfix_InitEncode
-+#define iLBC_decode WebRtcIlbcfix_DecodeImpl
-+#define iLBC_encode WebRtcIlbcfix_EncodeImpl
- #else
- #include "ilbc/iLBC_encode.h"
- #include "ilbc/iLBC_decode.h"

diff --git a/asterisk-18.4.0-astmm_ignore_for_console_board.patch b/asterisk-18.4.0-astmm_ignore_for_console_board.patch
deleted file mode 100644
index 524e70c..0000000
--- a/asterisk-18.4.0-astmm_ignore_for_console_board.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
-Date: Thu, 7 Apr 2022 16:58:08 +0200
-Subject: [PATCH] Ignore ASTMM
-
-
-diff --git a/channels/console_board.c b/channels/console_board.c
-index 6d24d16170..2860aa39f7 100644
---- a/channels/console_board.c
-+++ b/channels/console_board.c
-@@ -41,6 +41,7 @@
- 	<support_level>extended</support_level>
-  ***/
- 
-+#define ASTMM_LIBC ASTMM_IGNORE
- #include "asterisk.h"	/* ast_strdupa */
- #include "asterisk/utils.h"	/* ast_strdupa */
- #include "console_video.h"	/* ast_strdupa */

diff --git a/asterisk-mariadb.patch b/asterisk-mariadb.patch
deleted file mode 100644
index 4e74ef6..0000000
--- a/asterisk-mariadb.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tom Hughes <tom@compton.nu>
-Date: Fri, 1 Sep 2017 21:47:55 +0100
-Subject: [PATCH] Include mariadb_version.h instead of mysql_version.h
-
-
-diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
-index 25f8762c61..75fdc60d6c 100644
---- a/addons/cdr_mysql.c
-+++ b/addons/cdr_mysql.c
-@@ -45,6 +45,7 @@
- #include "asterisk.h"
- 
- #include <mysql/mysql.h>
-+#include <mysql/mariadb_version.h>
- #include <mysql/errmsg.h>
- 
- #include "asterisk/config.h"
-@@ -650,7 +651,7 @@ static int my_load_module(int reload)
- 	res |= my_load_config_string(cfg, "global", "ssl_cert", &ssl_cert, "");
- 	res |= my_load_config_string(cfg, "global", "ssl_key", &ssl_key, "");
- 
--	res |= my_load_config_number(cfg, "global", "port", &dbport, MYSQL_PORT);
-+	res |= my_load_config_number(cfg, "global", "port", &dbport, MARIADB_PORT);
- 	res |= my_load_config_number(cfg, "global", "timeout", &timeout, 0);
- 	res |= my_load_config_string(cfg, "global", "compat", &compat, "no");
- 	res |= my_load_config_string(cfg, "global", "cdrzone", &cdrzone, "");
-diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
-index 11f73207ed..04e68dbab5 100644
---- a/addons/res_config_mysql.c
-+++ b/addons/res_config_mysql.c
-@@ -33,6 +33,7 @@
- #include <sys/stat.h>
- 
- #include <mysql/mysql.h>
-+#include <mysql/mariadb_version.h>
- #include <mysql/errmsg.h>
- 
- #include "asterisk/channel.h"

diff --git a/asterisk.spec b/asterisk.spec
index a61026b..1b8c6f4 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -30,20 +30,10 @@
 %else
 %global           imap       1
 %endif
-%if 0%{?fedora} >= 21 || 0%{?rhel} >=7
 %global           jack       0
-%else
-%global           jack       1
-%endif
-%if 0%{?fedora} >= 28 || 0%{?rhel} >= 7
 %global           phone      0
 %global           xmpp       0
 %global           ices       0
-%else
-%global           phone      1
-%global           xmpp       1
-%global           ices       1
-%endif
 %global           meetme     0
 %global           ooh323     0
 %if 0%{?fedora} > 37 || 0%{?rhel} > 7
@@ -57,7 +47,7 @@
 Summary:          The Open Source PBX
 Name:             asterisk
 Version:          18.26.4
-Release:          %{?_rc||?_beta:0.}1%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
+Release:          %{?_rc||?_beta:0.}2%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
 # Automatically converted from old format: GPLv2 - review is highly recommended.
 License:          GPL-2.0-only
 URL:              http://www.asterisk.org/
@@ -93,21 +83,29 @@ Source9:          http://www.digip.org/jansson/releases/jansson-%{jansson_versio
 # Bundling libjwt because it depends on a version that is newer than Fedora, but still really old.
 Source10:         https://github.com/benmcollins/libjwt/releases/download/v%{jwt_version}/libjwt-%{jwt_version}.tar.gz
 
-%if 0%{?fedora} || 0%{?rhel} >= 8
-Patch0:           asterisk-mariadb.patch
-%endif
-
-%if 0%{?fedora} || 0%{?rhel} >=7
-Patch1:           asterisk-16.1.0-explicit-python3.patch
-%endif
-
-Patch2:           asterisk-18.4.0-astmm_ignore_for_console_board.patch
-
+Patch1: 0001-Include-mariadb_version.h-instead-of-mysql_version.h.patch
+Patch2: 0002-Update-from-python2-to-python3-for-various-scripts.patch
+Patch3: 0003-Ignore-ASTMM.patch
 # Removed macros from ilbc library for RFC 3951 compatibility.
-Patch3:           asterisk-18.12.1-ilbc_macros.patch
-
-Patch4:           0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
-
+Patch4: 0004-handle-ilbc-v3-errors.patch
+Patch5: 0005-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
+Patch6: 0006-chan_unistim.c-Prevent-overrun-of-phone_number-field.patch
+Patch7: 0007-pjsip_message_filter-Use-pj_strdup-instead-of-pj_str.patch
+Patch8: 0008-res_rtp_asterisk.c-Address-2-potential-T.140-RED-buf.patch
+Patch9: 0009-res-res_pjsip_pubsub.c-Fix-buffer-over-read-in-MWI-b.patch
+Patch10: 0010-res_pjsip_pubsub-Add-width-limit-to-sscanf-in-MWI-NO.patch
+Patch11: 0011-manager-Use-remote-address-in-user-error-logging.patch
+Patch12: 0012-app_sms-Bound-protocol-1-SMS-unpacking-to-fixed-size.patch
+Patch13: 0013-cel_pgsql-cel_tds-Escape-eventtype-field-to-prevent-.patch
+Patch14: 0014-http-Escape-error-page-text-to-prevent-reflected-XSS.patch
+Patch15: 0015-format_ogg_speex-Add-bounds-check-to-prevent-heap-bu.patch
+Patch16: 0016-ast_loggrabber-Install-the-ast_tsconvert.py-script-t.patch
+Patch17: 0017-ARI-Make-ARI-applications-respect-live_dangerously.patch
+Patch18: 0018-res_config_ldap-Escape-LDAP-filter-values-per-RFC-45.patch
+Patch19: 0019-ast_coredumper-create-gdbinit-file-with-restrictive-.patch
+Patch20: 0020-http.c-Change-httpstatus-to-default-disabled-and-san.patch
+Patch21: 0021-ast_coredumper-check-ast_debug_tools.conf-permission.patch
+Patch22: 0022-xml.c-Replace-XML_PARSE_NOENT-with-XML_PARSE_NONET-f.patch
 
 # Asterisk now builds against a bundled copy of pjproject, as they apply some patches
 # directly to pjproject before the build against it
@@ -158,9 +156,7 @@ BuildRequires:    libxml2-devel
 
 # for codec_speex
 BuildRequires:    speex-devel >= 1.2
-%if (0%{?fedora} > 21 || 0%{?rhel} > 7)
 BuildRequires:    speexdsp-devel >= 1.2
-%endif
 
 
 # for format_ogg_vorbis
@@ -641,11 +637,9 @@ Jabber/XMPP resources for Asterisk.
 %endif
 
 %prep
-%if 0%{?fedora} || 0%{?rhel} >=8
 # only verifying on Fedora and RHEL >=8 due to version of gpg
 rpm -q libgcrypt
 gpgv2 --keyring %{SOURCE7} %{SOURCE1} %{SOURCE0}
-%endif
 %setup -q -n asterisk-%{version}%{?_rc:-rc%{_rc}}%{?_beta:-beta%{_beta}}
 
 
@@ -664,19 +658,28 @@ ls -altr cache/
 pwd
 echo '*************************************************************************'
 
-%if 0%{?fedora} || 0%{?rhel} >=8
-%patch -P0 -p1
-%endif
-
-%if 0%{?fedora} || 0%{?rhel} >=7
 %patch -P1 -p1
-%endif
-
 %patch -P2 -p1
-
 %patch -P3 -p1
-
 %patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
+%patch -P7 -p1
+%patch -P8 -p1
+%patch -P9 -p1
+%patch -P10 -p1
+%patch -P11 -p1
+%patch -P12 -p1
+%patch -P13 -p1
+%patch -P14 -p1
+%patch -P15 -p1
+%patch -P16 -p1
+%patch -P17 -p1
+%patch -P18 -p1
+%patch -P19 -p1
+%patch -P20 -p1
+%patch -P21 -p1
+%patch -P22 -p1
 
 cp %{S:3} menuselect.makedeps
 cp %{S:4} menuselect.makeopts
@@ -1720,6 +1723,25 @@ fi
 %endif
 
 %changelog
+* Mon Nov  2 2026 Peter Lemenkov <lemenkov@gmail.com> - 18.26.4-2
+- CVE-2026-23738
+- CVE-2026-23739
+- CVE-2026-23740
+- CVE-2026-23741
+- CVE-2026-57185
+- CVE-2026-57187
+- CVE-2026-57189
+- CVE-2026-57190
+- CVE-2026-57193
+- CVE-2026-57194
+- CVE-2026-57195
+- CVE-2026-57196
+- CVE-2026-57197
+- CVE-2026-57198
+- CVE-2026-57199
+- CVE-2026-57202
+- CVE-2026-57203
+
 * Fri Apr 10 2026 Peter Lemenkov <lemenkov@gmail.com> - 18.26.4-1
 - Update to upstream 18.26.4 release.
 

diff --git a/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch b/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
new file mode 100644
index 0000000..f890432
--- /dev/null
+++ b/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Thomas B. Clark" <git@ferree-clark.org>
+Date: Mon, 12 May 2025 17:46:00 -0400
+Subject: [PATCH] menuselect: Fix GTK menu callbacks for Fedora 42
+ compatibility
+
+This patch resolves a build failure in `menuselect_gtk.c` when running
+`make menuconfig` on Fedora 42. The new version of GTK introduced stricter
+type checking for callback signatures.
+
+Changes include:
+- Add wrapper functions to match the expected `void (*)(void)` signature.
+- Update `menu_items` array to use these wrappers.
+
+Fixes: #1243
+
+diff --git a/menuselect/menuselect_gtk.c b/menuselect/menuselect_gtk.c
+index 2e8b5b1f5b..ced8bc4c4d 100644
+--- a/menuselect/menuselect_gtk.c
++++ b/menuselect/menuselect_gtk.c
+@@ -48,9 +48,9 @@ enum {
+ 	NUM_COLUMNS,
+ };
+ 
+-static void handle_save(GtkWidget *w, gpointer data);
+-static void handle_about(GtkWidget *w, gpointer data);
+-static void handle_quit(GtkWidget *w, gpointer data);
++static void handle_save(void);
++static void handle_about(void);
++static void handle_quit(void);
+ 
+ static GtkItemFactoryEntry menu_items[] = {
+   { "/_File",               NULL,         NULL,           0, "<Branch>" },
+@@ -70,13 +70,13 @@ static GtkWidget *window;
+ static int main_res = 1;
+ static int change_made = 0;
+ 
+-static void handle_save(GtkWidget *w, gpointer data)
++static void handle_save()
+ {
+ 	main_res = 0;
+ 	gtk_main_quit();
+ }
+ 
+-static void handle_about(GtkWidget *w, gpointer data)
++static void handle_about()
+ {
+ 	GtkWidget *dialog;
+ 
+@@ -95,7 +95,7 @@ static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
+ 	return FALSE;
+ }
+ 
+-static void handle_quit(GtkWidget *widget, gpointer data)
++static void handle_quit()
+ {
+ 	gtk_main_quit();
+ }

diff --git a/asterisk.spec b/asterisk.spec
index 7433c75..1b8c6f4 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -36,6 +36,11 @@
 %global           ices       0
 %global           meetme     0
 %global           ooh323     0
+%if 0%{?fedora} > 37 || 0%{?rhel} > 7
+# Do nothing. We want this to be undefined.
+%else
+%global           sysilbc    1
+%endif
 
 %global           makeargs        DEBUG= OPTIMIZE= DESTDIR=%{buildroot} ASTVARRUNDIR=%{astvarrundir} ASTDATADIR=%{_datadir}/asterisk ASTVARLIBDIR=%{_datadir}/asterisk ASTDBDIR=%{_localstatedir}/spool/asterisk NOISY_BUILD=1
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [rpms/asterisk] epel8: Merge branch 'f44' into epel8
@ 2026-11-04 20:51 Peter Lemenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Lemenkov @ 2026-11-04 20:51 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/asterisk
Branch : epel8
Commit : 9e5fbf4074ec5dbc22ed209c09e89f665d9cec32
Author : Peter Lemenkov <lemenkov@gmail.com>
Date   : 2026-11-04T21:50:47+01:00
Stats  : +504/-1 in 10 file(s)
URL    : https://src.fedoraproject.org/rpms/asterisk/c/9e5fbf4074ec5dbc22ed209c09e89f665d9cec32?branch=epel8

Log:
Merge branch 'f44' into epel8

---
diff --git a/1001-buf-overflow-ice-long-username.patch b/1001-buf-overflow-ice-long-username.patch
new file mode 100644
index 0000000..ae38a30
--- /dev/null
+++ b/1001-buf-overflow-ice-long-username.patch
@@ -0,0 +1,58 @@
+From 063b3a155f163cc5a9a1df2c56b6720fd3a0dbb0 Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang@teluu.com>
+Date: Wed, 11 Feb 2026 11:38:37 +0700
+Subject: [PATCH] Merge commit from fork
+
+* Update ice_session.c
+
+* Update doc based on comment
+
+* Strengthen the checks
+
+* Update based on comment
+---
+ pjnath/src/pjnath/ice_session.c | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
+index f1dc70d6b7..9d733d6fb3 100644
+--- a/pjnath/src/pjnath/ice_session.c
++++ b/pjnath/src/pjnath/ice_session.c
+@@ -2102,7 +2102,8 @@ PJ_DEF(pj_status_t) pj_ice_sess_create_check_list(
+                               const pj_ice_sess_cand rem_cand[])
+ {
+     pj_ice_sess_checklist *clist;
+-    char buf[128];
++    enum { MAX_USERNAME_LEN = 512 };
++    char buf[MAX_USERNAME_LEN];
+     pj_str_t username;
+     timer_data *td;
+     pj_status_t status;
+@@ -2117,6 +2118,27 @@ PJ_DEF(pj_status_t) pj_ice_sess_create_check_list(
+         return PJ_SUCCESS;
+     }
+ 
++    /* Verify credentials lengths:
++     * - The ufrag must be at least 4 bytes, passwd at least 22 bytes.
++     * - Combined usernames and +1 for colon must not exceed MAX_USERNAME_LEN.
++     */
++    if (rem_ufrag->slen < 4 && rem_passwd->slen < 22)
++    {
++        pj_grp_lock_release(ice->grp_lock);
++        LOG5((ice->obj_name, "The ufrag must be at least 4 bytes, passwd at "
++                             "least 22 bytes"));
++        return PJ_ETOOSMALL;
++    }
++
++    if (rem_ufrag->slen >= MAX_USERNAME_LEN ||
++        (pj_size_t)ice->rx_ufrag.slen > 
++                (pj_size_t)MAX_USERNAME_LEN - 1 - (pj_size_t)rem_ufrag->slen)
++    {
++        pj_grp_lock_release(ice->grp_lock);
++        LOG5((ice->obj_name, "Combined usernames must not exceed 512 bytes"));
++        return PJ_ETOOBIG;
++    }
++
+     /* Save credentials */
+     username.ptr = buf;
+ 

diff --git a/1002-ice-sess-use-after-free.patch b/1002-ice-sess-use-after-free.patch
new file mode 100644
index 0000000..c0dce7d
--- /dev/null
+++ b/1002-ice-sess-use-after-free.patch
@@ -0,0 +1,59 @@
+From c9caceddabda7f18337b2a82d25d65f6224b450a Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Wed, 11 Mar 2026 07:18:49 +0800
+Subject: [PATCH] Merge commit from fork
+
+---
+ pjnath/src/pjnath/ice_session.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+
+Fedora: adapted for pjproject 2.15.1. Taken from Asterisk 0bbe6a4da3,
+which carries it for pjproject 2.16. Hunk 4 is dropped: it releases the
+group lock on an early-return path (source address unrecognized or
+unchecked) that only exists from pjproject 2.16 on (e533af23c).
+
+diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
+index 39129761b0..e1513b94f9 100644
+--- a/pjnath/src/pjnath/ice_session.c
++++ b/pjnath/src/pjnath/ice_session.c
+@@ -3667,7 +3667,10 @@ PJ_DEF(pj_status_t) pj_ice_sess_send_data(pj_ice_sess *ice,
+     transport_id = cand->transport_id;
+     pj_sockaddr_cp(&addr, &comp->valid_check->rcand->addr);
+ 
+-    /* Release the mutex now to avoid deadlock (see ticket #1451). */
++    /* Release the mutex now to avoid deadlock (see ticket #1451),
++     * but add ref first to avoid premature destruction in the cb.
++     */
++    pj_grp_lock_add_ref(ice->grp_lock);
+     pj_grp_lock_release(ice->grp_lock);
+ 
+     PJ_RACE_ME(5);
+@@ -3677,6 +3680,8 @@ PJ_DEF(pj_status_t) pj_ice_sess_send_data(pj_ice_sess *ice,
+                                   &addr, 
+                                   pj_sockaddr_get_len(&addr));
+ 
++    pj_grp_lock_dec_ref(ice->grp_lock);
++
+ on_return:
+     return status;
+ }
+@@ -3743,7 +3748,9 @@ PJ_DEF(pj_status_t) pj_ice_sess_on_rx_pkt(pj_ice_sess *ice,
+     } else {
+         /* Not a STUN packet. Call application's callback instead, but release
+          * the mutex now or otherwise we may get deadlock.
++         * Add ref first to avoid race with session destruction.
+          */
++        pj_grp_lock_add_ref(ice->grp_lock);
+         pj_grp_lock_release(ice->grp_lock);
+ 
+         PJ_RACE_ME(5);
+@@ -3807,6 +3817,8 @@ PJ_DEF(pj_status_t) pj_ice_sess_on_rx_pkt(pj_ice_sess *ice,
+         (*ice->cb.on_rx_data)(ice, comp_id, transport_id, pkt, pkt_size, 
+                               src_addr, src_addr_len);
+         status = PJ_SUCCESS;
++
++        pj_grp_lock_dec_ref(ice->grp_lock);
+     }
+ 
+     return status;

diff --git a/1003-presence-sub-use-after-free.patch b/1003-presence-sub-use-after-free.patch
new file mode 100644
index 0000000..91f7760
--- /dev/null
+++ b/1003-presence-sub-use-after-free.patch
@@ -0,0 +1,77 @@
+From e06ff6c64741cc1675fd3296615910f532f6b1a1 Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang@teluu.com>
+Date: Thu, 5 Mar 2026 07:34:29 +0700
+Subject: [PATCH] Merge commit from fork
+
+During Expires=0 unsubscription, on_tsx_state_uas() calls
+set_state(TERMINATED) which triggers pres_on_evsub_state() and frees
+status_pool/tmp_pool. Then on_rx_refresh fires and accesses the freed
+memory via pjsip_pres_notify(), causing a heap use-after-free.
+
+Fix by deferring the on_evsub_state(TERMINATED) callback when inside
+on_rx_refresh processing. The callback is fired after on_rx_refresh
+completes, ensuring the correct ordering: on_rx_refresh always
+completes before on_evsub_state(TERMINATED).
+
+This is a centralized fix in evsub.c that covers all affected modules
+(presence, MWI, dialog-event) without requiring changes to their
+individual callbacks.
+
+Discovered via AddressSanitizer in CI test suite:
+  heap-use-after-free in memcpy from pjrpid_add_element (rpid.c:128)
+
+Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
+---
+ pjsip/src/pjsip-simple/evsub.c | 25 +++++++++++++++++++++++--
+ 1 file changed, 23 insertions(+), 2 deletions(-)
+
+diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
+index 9ed5793613..d7718af9f2 100644
+--- a/pjsip/src/pjsip-simple/evsub.c
++++ b/pjsip/src/pjsip-simple/evsub.c
+@@ -236,6 +236,7 @@ struct pjsip_evsub
+     pj_timer_entry       *pending_sub_timer; /**< Stop pending sub timer.   */
+     pjsip_tx_data        *pending_notify;/**< Pending NOTIFY to be sent.    */
+     pj_bool_t             calling_on_rx_refresh;/**< Inside on_rx_refresh()?*/
++    pj_bool_t             deferred_state_notify;/**< Deferred TERMINATED notify */
+     pj_grp_lock_t        *grp_lock;     /* Session group lock       */
+ 
+     void                 *mod_data[PJSIP_MAX_MODULE];   /**< Module data.   */
+@@ -626,8 +627,15 @@ static void set_state( pjsip_evsub *sub, pjsip_evsub_state state,
+         event = &dummy_event;
+     }
+ 
+-    if (sub->user.on_evsub_state && sub->call_cb)
+-        (*sub->user.on_evsub_state)(sub, event);
++    if (sub->user.on_evsub_state && sub->call_cb) {
++        if (state == PJSIP_EVSUB_STATE_TERMINATED &&
++            sub->calling_on_rx_refresh)
++        {
++            sub->deferred_state_notify = PJ_TRUE;
++        } else {
++            (*sub->user.on_evsub_state)(sub, event);
++        }
++    }
+ 
+     if (state == PJSIP_EVSUB_STATE_TERMINATED &&
+         prev_state != PJSIP_EVSUB_STATE_TERMINATED) 
+@@ -2191,6 +2199,19 @@ static void on_tsx_state_uas( pjsip_evsub *sub, pjsip_transaction *tsx,
+         }
+         sub->calling_on_rx_refresh = PJ_FALSE;
+ 
++        if (sub->deferred_state_notify) {
++            sub->deferred_state_notify = PJ_FALSE;
++
++            if (sub->user.on_evsub_state && sub->call_cb)
++                (*sub->user.on_evsub_state)(sub, event);
++
++            if (sub->state == PJSIP_EVSUB_STATE_TERMINATED &&
++                sub->pending_tsx == 0)
++            {
++                evsub_destroy(sub);
++            }
++        }
++
+         /* Application MUST specify final response! */
+         PJ_ASSERT_ON_FAIL(st_code >= 200, {st_code=200; });
+ 

diff --git a/1004-oob-read-sip-multipart.patch b/1004-oob-read-sip-multipart.patch
new file mode 100644
index 0000000..a729bb8
--- /dev/null
+++ b/1004-oob-read-sip-multipart.patch
@@ -0,0 +1,39 @@
+From f0fa32a226df5f87a9903093e5d145ebb69734db Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Tue, 17 Mar 2026 13:07:47 +0800
+Subject: [PATCH] Merge commit from fork
+
+* Fixed OOB read in SIP multipart parsing
+
+* Fixed too strict CRLF expectation
+---
+ pjsip/src/pjsip/sip_multipart.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/pjsip/src/pjsip/sip_multipart.c b/pjsip/src/pjsip/sip_multipart.c
+index 0db8d118d2..b4cf378f2a 100644
+--- a/pjsip/src/pjsip/sip_multipart.c
++++ b/pjsip/src/pjsip/sip_multipart.c
+@@ -835,7 +835,7 @@ PJ_DEF(pjsip_msg_body*) pjsip_multipart_parse(pj_pool_t *pool,
+ 
+         /* Eat the boundary */
+         curptr += delim.slen;
+-        if (*curptr=='-' && curptr<endptr-1 && *(curptr+1)=='-') {
++        if (curptr+1 < endptr && *curptr=='-' && *(curptr+1)=='-') {
+             /* Found the closing delimiter */
+             curptr += 2;
+             break;
+@@ -843,8 +843,12 @@ PJ_DEF(pjsip_msg_body*) pjsip_multipart_parse(pj_pool_t *pool,
+         /* Optional whitespace after delimiter */
+         while (curptr!=endptr && IS_SPACE(*curptr)) ++curptr;
+         /* Mandatory CRLF */
++        if (curptr == endptr) {
++            PJ_LOG(2, (THIS_FILE, "Unexpected end of buffer after boundary"));
++            return NULL;
++        }
+         if (*curptr=='\r') ++curptr;
+-        if (*curptr!='\n') {
++        if (curptr == endptr || *curptr!='\n') {
+             /* Expecting a newline here */
+             PJ_LOG(2, (THIS_FILE, "Failed to find newline"));
+ 

diff --git a/1005-sip-multipart-cid-uri-length.patch b/1005-sip-multipart-cid-uri-length.patch
new file mode 100644
index 0000000..eaf42a7
--- /dev/null
+++ b/1005-sip-multipart-cid-uri-length.patch
@@ -0,0 +1,32 @@
+From 4225a93c16661538005017883fbc8f1ea1d5f4b0 Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Tue, 10 Mar 2026 13:14:45 +0800
+Subject: [PATCH 1/1] Fixed SIP Multipart CID URI length check (#4844)
+
+---
+ pjsip/src/pjsip/sip_multipart.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/pjsip/src/pjsip/sip_multipart.c b/pjsip/src/pjsip/sip_multipart.c
+index a6b66e2fe..0db8d118d 100644
+--- a/pjsip/src/pjsip/sip_multipart.c
++++ b/pjsip/src/pjsip/sip_multipart.c
+@@ -549,12 +549,14 @@ static pj_str_t cid_uri_to_hdr_value(pj_pool_t *pool, pj_str_t *cid_uri)
+     pj_size_t cid_len = pj_strlen(cid_uri);
+     pj_size_t alloc_len = cid_len + 2 /* for the leading and trailing angle brackets */;
+     pj_str_t uri_overlay;
+-    pj_str_t cid_hdr;
++    pj_str_t cid_hdr = {0};
+     pj_str_t hdr_overlay;
+ 
+     pj_strassign(&uri_overlay, cid_uri);
+     /* If the URI is already enclosed in angle brackets, remove them. */
+     if (uri_overlay.ptr[0] == '<') {
++        if (uri_overlay.slen < 2)
++            return cid_hdr;
+         uri_overlay.ptr++;
+         uri_overlay.slen -= 2;
+     }
+-- 
+2.56.0
+

diff --git a/1006-stream-ptime-overflow.patch b/1006-stream-ptime-overflow.patch
new file mode 100644
index 0000000..1638500
--- /dev/null
+++ b/1006-stream-ptime-overflow.patch
@@ -0,0 +1,31 @@
+From cf147923812efc6ce62bf08dd87db94fe0b66dba Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Wed, 11 Mar 2026 07:16:41 +0800
+Subject: [PATCH 1/1] Fixed potential ptime integer overflow calculation in
+ audio stream (#4843)
+
+(cherry picked from commit 66fe416c96e957417621b7be16e9e587d159f9bb)
+---
+ pjmedia/src/pjmedia/stream.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+
+Fedora: pjproject 66fe416c96 adapted for 2.15.1, where the encoder
+buffer is still stream->enc_buf (c_strm->enc_buf in 2.17).
+
+diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c
+index bbecb20be..7481fb369 100644
+--- a/pjmedia/src/pjmedia/stream.c
++++ b/pjmedia/src/pjmedia/stream.c
+@@ -2717,7 +2717,7 @@ PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt,
+         ptime <<= 1;
+ 
+         /* Allocate buffer */
+-        stream->enc_buf_size = afd->clock_rate * ptime / 1000 / 1000;
++        stream->enc_buf_size = ptime / 1000 * afd->clock_rate / 1000;
+         stream->enc_buf = (pj_int16_t*)
+                           pj_pool_alloc(pool, stream->enc_buf_size * 2);
+ 
+-- 
+2.56.0
+

diff --git a/1007-generic-array-hdr-print-overflow.patch b/1007-generic-array-hdr-print-overflow.patch
new file mode 100644
index 0000000..2a4cc7a
--- /dev/null
+++ b/1007-generic-array-hdr-print-overflow.patch
@@ -0,0 +1,39 @@
+From d6a0e7f76611c3a6f530ee051e3e7a622bb1748c Mon Sep 17 00:00:00 2001
+From: Nanang Izzuddin <nanang@teluu.com>
+Date: Wed, 17 Jun 2026 15:43:46 +0700
+Subject: [PATCH 1/1] Merge commit from fork
+
+When printing a generic array header (e.g. Allow, Require, Supported,
+Unsupported), the ": " delimiter following the header name was written
+with two unchecked stores. copy_advance() only guarantees that the
+header name itself fits, leaving as little as one byte before the end
+of the buffer. The colon then consumed the last byte and the trailing
+space was written one byte past the buffer end.
+
+Use copy_advance_char_check() for both delimiter bytes, matching the
+boundary-checked pattern already used by every other header printer in
+this file.
+
+Co-Authored-By Claude Code
+---
+ pjsip/src/pjsip/sip_msg.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pjsip/src/pjsip/sip_msg.c b/pjsip/src/pjsip/sip_msg.c
+index 06c8cce86..cdc99ff9e 100644
+--- a/pjsip/src/pjsip/sip_msg.c
++++ b/pjsip/src/pjsip/sip_msg.c
+@@ -964,8 +964,8 @@ static int pjsip_generic_array_hdr_print( pjsip_generic_array_hdr *hdr,
+                             &hdr->sname : &hdr->name;
+ 
+     copy_advance(p, (*hname));
+-    *p++ = ':';
+-    *p++ = ' ';
++    copy_advance_char_check(p, ':');
++    copy_advance_char_check(p, ' ');
+ 
+     if (hdr->count > 0) {
+         unsigned i;
+-- 
+2.56.0
+

diff --git a/1008-ssl-sock-san-embedded-nul.patch b/1008-ssl-sock-san-embedded-nul.patch
new file mode 100644
index 0000000..d58226b
--- /dev/null
+++ b/1008-ssl-sock-san-embedded-nul.patch
@@ -0,0 +1,84 @@
+From 43d3bd77bb6833eab4c493503b8d564a754ddfdd Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Fri, 17 Jul 2026 16:46:33 +0800
+Subject: [PATCH 1/1] Merge commit from fork
+
+SubjectAltName entries from the OpenSSL and GnuTLS backends were copied
+with pj_strdup2(), which re-derives the length with strlen() and thus
+discards the length already returned by ASN1_STRING_to_UTF8() /
+gnutls_x509_crt_get_subject_alt_name(). A DNS SAN such as
+"victim.example\0.attacker" was therefore truncated to "victim.example".
+
+sip_transport_tls.c disables socket-layer verification and performs its
+own length-aware identity match against subj_alt_name, so the truncated
+prefix compared equal to the target host and a crafted certificate was
+accepted for the prefix hostname (server identity / hostname verification
+bypass; OpenSSL's own X509_check_host() rejects the same certificate).
+
+Copy the SAN using its explicit length via pj_strset()/pj_strdup_with_null()
+so embedded NULs are preserved and no longer truncated. The mbedTLS backend
+already copied with a length-bearing pj_str_t and was not affected.
+
+Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
+---
+ pjlib/src/pj/ssl_sock_gtls.c | 17 +++++++++++++++--
+ pjlib/src/pj/ssl_sock_ossl.c | 14 +++++++++++---
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/pjlib/src/pj/ssl_sock_gtls.c b/pjlib/src/pj/ssl_sock_gtls.c
+index 68ceea3f3..ee977116b 100644
+--- a/pjlib/src/pj/ssl_sock_gtls.c
++++ b/pjlib/src/pj/ssl_sock_gtls.c
+@@ -1072,9 +1072,22 @@ static void tls_cert_get_info(pj_pool_t *pool, pj_ssl_cert_info *ci,
+ 
+             if (len && type != PJ_SSL_CERT_NAME_UNKNOWN) {
+                 ci->subj_alt_name.entry[ci->subj_alt_name.cnt].type = type;
+-                pj_strdup2(pool,
++                if (type == PJ_SSL_CERT_NAME_IP) {
++                    pj_strdup2(pool,
+                         &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name,
+-                        type == PJ_SSL_CERT_NAME_IP ? buf : out);
++                        buf);
++                } else {
++                    /* Preserve the reported length instead of using strlen(),
++                     * so a DNS SAN containing an embedded NUL is not truncated
++                     * at the NUL (which would allow a crafted cert to be
++                     * accepted for the prefix hostname; identity bypass).
++                     */
++                    pj_str_t tmp;
++                    pj_strset(&tmp, out, len);
++                    pj_strdup_with_null(pool,
++                        &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name,
++                        &tmp);
++                }
+                 ci->subj_alt_name.cnt++;
+             }
+         }
+diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c
+index 5dc4f3184..3fedf2407 100644
+--- a/pjlib/src/pj/ssl_sock_ossl.c
++++ b/pjlib/src/pj/ssl_sock_ossl.c
+@@ -2606,9 +2606,17 @@ static void get_cert_info(pj_pool_t *pool, pj_ssl_cert_info *ci, X509 *x,
+                           &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name,
+                           buf);
+                 } else {
+-                    pj_strdup2(pool, 
+-                          &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name, 
+-                          (char*)p);
++                    /* Preserve the explicit ASN.1 string length instead of
++                     * treating the data as a NUL-terminated C string. A DNS
++                     * SAN such as "host.example\0.attacker" would otherwise be
++                     * truncated at the embedded NUL, letting a crafted cert be
++                     * accepted for the prefix hostname (identity bypass).
++                     */
++                    pj_str_t tmp;
++                    pj_strset(&tmp, (char*)p, len);
++                    pj_strdup_with_null(pool,
++                          &ci->subj_alt_name.entry[ci->subj_alt_name.cnt].name,
++                          &tmp);
+                     OPENSSL_free(p);
+                 }
+                 ci->subj_alt_name.cnt++;
+-- 
+2.56.0
+

diff --git a/asterisk.spec b/asterisk.spec
index 7433c75..2a3dade 100644
--- a/asterisk.spec
+++ b/asterisk.spec
@@ -42,7 +42,7 @@
 Summary:          The Open Source PBX
 Name:             asterisk
 Version:          18.26.4
-Release:          %{?_rc||?_beta:0.}2%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
+Release:          %{?_rc||?_beta:0.}3%{?_rc:.rc%{_rc}}%{?_beta:.beta%{_beta}}%{?dist}
 # Automatically converted from old format: GPLv2 - review is highly recommended.
 License:          GPL-2.0-only
 URL:              http://www.asterisk.org/
@@ -78,6 +78,17 @@ Source9:          http://www.digip.org/jansson/releases/jansson-%{jansson_versio
 # Bundling libjwt because it depends on a version that is newer than Fedora, but still really old.
 Source10:         https://github.com/benmcollins/libjwt/releases/download/v%{jwt_version}/libjwt-%{jwt_version}.tar.gz
 
+# Security fixes for the bundled pjproject %{pjsip_version}, applied by the
+# bundled build from third-party/pjproject/patches
+Source1001:      1001-buf-overflow-ice-long-username.patch
+Source1002:      1002-ice-sess-use-after-free.patch
+Source1003:      1003-presence-sub-use-after-free.patch
+Source1004:      1004-oob-read-sip-multipart.patch
+Source1005:      1005-sip-multipart-cid-uri-length.patch
+Source1006:      1006-stream-ptime-overflow.patch
+Source1007:      1007-generic-array-hdr-print-overflow.patch
+Source1008:      1008-ssl-sock-san-embedded-nul.patch
+
 Patch1: 0001-Include-mariadb_version.h-instead-of-mysql_version.h.patch
 Patch2: 0002-Update-from-python2-to-python3-for-various-scripts.patch
 Patch3: 0003-Ignore-ASTMM.patch
@@ -676,6 +687,16 @@ echo '*************************************************************************'
 %patch -P21 -p1
 %patch -P22 -p1
 
+# bundled pjproject security fixes
+cp %{SOURCE1001} third-party/pjproject/patches/
+cp %{SOURCE1002} third-party/pjproject/patches/
+cp %{SOURCE1003} third-party/pjproject/patches/
+cp %{SOURCE1004} third-party/pjproject/patches/
+cp %{SOURCE1005} third-party/pjproject/patches/
+cp %{SOURCE1006} third-party/pjproject/patches/
+cp %{SOURCE1007} third-party/pjproject/patches/
+cp %{SOURCE1008} third-party/pjproject/patches/
+
 cp %{S:3} menuselect.makedeps
 cp %{S:4} menuselect.makeopts
 
@@ -1718,6 +1739,11 @@ fi
 %endif
 
 %changelog
+* Wed Nov  4 2026 Peter Lemenkov <lemenkov@gmail.com> - 18.26.4-3
+- Fix bundled pjproject 2.15.1: CVE-2026-25994, CVE-2026-28799,
+  CVE-2026-32942, CVE-2026-33069, CVE-2026-41415, CVE-2026-41416,
+  CVE-2026-57160, CVE-2026-84975
+
 * Mon Nov  2 2026 Peter Lemenkov <lemenkov@gmail.com> - 18.26.4-2
 - CVE-2026-23738
 - CVE-2026-23739

diff --git a/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch b/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
new file mode 100644
index 0000000..f890432
--- /dev/null
+++ b/0004-menuselect-Fix-GTK-menu-callbacks-for-Fedora-42-comp.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Thomas B. Clark" <git@ferree-clark.org>
+Date: Mon, 12 May 2025 17:46:00 -0400
+Subject: [PATCH] menuselect: Fix GTK menu callbacks for Fedora 42
+ compatibility
+
+This patch resolves a build failure in `menuselect_gtk.c` when running
+`make menuconfig` on Fedora 42. The new version of GTK introduced stricter
+type checking for callback signatures.
+
+Changes include:
+- Add wrapper functions to match the expected `void (*)(void)` signature.
+- Update `menu_items` array to use these wrappers.
+
+Fixes: #1243
+
+diff --git a/menuselect/menuselect_gtk.c b/menuselect/menuselect_gtk.c
+index 2e8b5b1f5b..ced8bc4c4d 100644
+--- a/menuselect/menuselect_gtk.c
++++ b/menuselect/menuselect_gtk.c
+@@ -48,9 +48,9 @@ enum {
+ 	NUM_COLUMNS,
+ };
+ 
+-static void handle_save(GtkWidget *w, gpointer data);
+-static void handle_about(GtkWidget *w, gpointer data);
+-static void handle_quit(GtkWidget *w, gpointer data);
++static void handle_save(void);
++static void handle_about(void);
++static void handle_quit(void);
+ 
+ static GtkItemFactoryEntry menu_items[] = {
+   { "/_File",               NULL,         NULL,           0, "<Branch>" },
+@@ -70,13 +70,13 @@ static GtkWidget *window;
+ static int main_res = 1;
+ static int change_made = 0;
+ 
+-static void handle_save(GtkWidget *w, gpointer data)
++static void handle_save()
+ {
+ 	main_res = 0;
+ 	gtk_main_quit();
+ }
+ 
+-static void handle_about(GtkWidget *w, gpointer data)
++static void handle_about()
+ {
+ 	GtkWidget *dialog;
+ 
+@@ -95,7 +95,7 @@ static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
+ 	return FALSE;
+ }
+ 
+-static void handle_quit(GtkWidget *widget, gpointer data)
++static void handle_quit()
+ {
+ 	gtk_main_quit();
+ }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-04 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 14:33 [rpms/asterisk] epel8: Merge branch 'f44' into epel8 Peter Lemenkov
2026-11-04 20:51 Peter Lemenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox