<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18200">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST-2022-006: pjproject - unconstrained malformed multipart SIP message<br><br>ASTERISK-29945 #close<br><br>Change-Id: Ic58957afc453195d53c2bd25c905df3d91d1abe6<br>---<br>A third-party/pjproject/patches/0172-prevent-multipart-oob.patch<br>1 file changed, 42 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/00/18200/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/third-party/pjproject/patches/0172-prevent-multipart-oob.patch b/third-party/pjproject/patches/0172-prevent-multipart-oob.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..2c82035</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0172-prevent-multipart-oob.patch</span><br><span>@@ -0,0 +1,42 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 077b465c33f0aec05a49cd2ca456f9a1b112e896 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: sauwming <ming@teluu.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Wed, 26 Jan 2022 13:28:57 +0800</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH] Merge pull request from GHSA-7fw8-54cv-r7pm</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ pjlib-util/src/pjlib-util/scanner.c | 13 +++++++++----</span><br><span style="color: hsl(120, 100%, 40%);">+ 1 file changed, 9 insertions(+), 4 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/pjlib-util/src/pjlib-util/scanner.c b/pjlib-util/src/pjlib-util/scanner.c</span><br><span style="color: hsl(120, 100%, 40%);">+index 27a0b8831..a54edf2d8 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjlib-util/src/pjlib-util/scanner.c</span><br><span>++++ b/pjlib-util/src/pjlib-util/scanner.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -444,16 +444,21 @@ PJ_DEF(void) pj_scan_get_n( pj_scanner *scanner,</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+- int chr = *scanner->curptr;</span><br><span style="color: hsl(120, 100%, 40%);">++ register char *s = scanner->curptr;</span><br><span style="color: hsl(120, 100%, 40%);">++ int chr;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- if (!chr) {</span><br><span style="color: hsl(120, 100%, 40%);">++ if (s >= scanner->end || !*s) {</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_scan_syntax_err(scanner);</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- ++scanner->curptr;</span><br><span style="color: hsl(120, 100%, 40%);">++ chr = *s;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {</span><br><span style="color: hsl(120, 100%, 40%);">++ ++s;</span><br><span style="color: hsl(120, 100%, 40%);">++ scanner->curptr = s;</span><br><span style="color: hsl(120, 100%, 40%);">++ if (PJ_SCAN_CHECK_EOF(s) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&</span><br><span style="color: hsl(120, 100%, 40%);">++ scanner->skip_ws)</span><br><span style="color: hsl(120, 100%, 40%);">++ {</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_scan_skip_whitespace(scanner);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ return chr;</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.25.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18200">change 18200</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18200"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19.2 </div>
<div style="display:none"> Gerrit-Change-Id: Ic58957afc453195d53c2bd25c905df3d91d1abe6 </div>
<div style="display:none"> Gerrit-Change-Number: 18200 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>