From nobody Mon Jun 26 18:06:55 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QqbQS1xMrz4jCQw for ; Mon, 26 Jun 2023 18:06:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqbQR26z9z3t5H for ; Mon, 26 Jun 2023 18:06:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687802815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QrummrbQV+SVyRPY0lg4Ox9YsO+SMYz8VtICZp+tfS4=; b=dpjOatCDaFGLqKfScArn0OAChS2mMvPXsqsmnailrvwBr4MhABUUPxfat7uY/HDV/wpMxF kw7MMOUx77YEeQILoUzvepdNLJF9UnFJzI6KuK++sL/wPqVGaC3OVXTvCNArtlOquUhsPq DrwaaHg1TAEDWwBw+rmJ8D8VnMiXreZnsLWFaMYVz5l7H9X9ml28QGdpfPutrkv5CG3f62 9brj4sPDJCNTeX21DTUkC+pYBS2jjlejDv8JcA14o7A5HqsspoyWninP3hSA+FiJPQSzkx 9N4wtohw9vYASM/SkDH2338G7PGpNfKxdzq9es7aiPQX3tSnXfUFsNuk/ZKVDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687802815; a=rsa-sha256; cv=none; b=pUZpY+gYrTDKVh3Dvf7IujdtMLERqFcSHPouKMvl0H6J7gfXMPWHUD/9dkb+OaREa1Ryx0 rHIHXDVICRzwyoYiaq/ATy1z5sR6zw1VjNU3Nka79YZhdljHFnbVzMzfpX47yv6O150cA2 f83DJGCocSH1K4OiW2OeJ0PTEbHlGGL7YB6aJMJPfUchCARAJ0vSlyied2Dp6by+eblwYi YEpN69TBwmXHHKntA3Y2B4zaiwDjZLLZPIhJR0nAi19YQInBb9v/oP27vYWoXxxJV9X+QR 00DlIovbutKOfvnLbXiFVzpch0MsaUFfgtdu2f4Z62p6VXG531/flQb5Kw9Tcw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqbQR15R9zKxF for ; Mon, 26 Jun 2023 18:06:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 35QI6tDP059790 for ; Mon, 26 Jun 2023 18:06:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35QI6ttZ059789 for bugs@FreeBSD.org; Mon, 26 Jun 2023 18:06:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272228] libpam's openpam_subst() can crash if prompt ends with % Date: Mon, 26 Jun 2023 18:06:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272228 Bug ID: 272228 Summary: libpam's openpam_subst() can crash if prompt ends with % Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu If a PAM user prompt ends with %, then openpam_subst() increments template (the prompt) beyond the prompt's terminal '\0', and (depending what's beyond the end) can eventually crash. One place such a prompt could come from is a remote TACACS+ server. while (*template && ret =3D=3D PAM_SUCCESS) { if (template[0] =3D=3D '%') { ++template; switch (*template) { ...; case '\0': subst_char('%'); break; ...; } ++template; } } --=20 You are receiving this mail because: You are the assignee for the bug.=