From: Jens Message-Id: Date: Tue, 19 Apr 2016 21:01:32 +0200 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: [Openvpn-devel] [PATCH] auth-pam:Fix buffer overflow by user supplied data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: openvpn-devel Hi, please review the following patch. The AUTH-PAM plugin contains the function `searchandreplace`. The buffer al= located there can be overflown if the parameter `replace_with` is to long = (depending on the format string). E.g.: searchandreplace(to search :=3D=E2=80=9CX=E2=80=9D, searchfor :=3D =E2=80= =9CX=E2=80=9D, replacewith :=3D =E2=80=9C0123456789!=E2=80=9D) would overflow `temp` with the character =E2=80=98!=E2=80=99. The call tree contains multiple calls with a user supplied value for `repla= ce_with`. Jens