From nobody Fri Oct 09 00:20:34 2026 X-Original-To: dev-commits-src-all@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 4j16vk4QXqz6Z28X for ; Fri, 09 Oct 2026 00:20:34 +0000 (UTC) (envelope-from git@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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4j16vk2rSkz4LDC for ; Fri, 09 Oct 2026 00:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791505234; 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=CxWNFTKJfvlEn+WYeJunLE5d5pi01C+ijAjzNhy+JM8=; b=w6/tZuyhDIKqOnnuDed/jNzpj8CnMOCcbyZ5VdTfGD85HXA7tL4OE0LukIe9cS4TzFoQXa dorlqUMcdgOyw1sv4+p79GuvA/OeZuwaNk49JyAwnQUSV6iUuPhaq4IaENeSZtMmxGLYUR 9VPaL+52WabwwiWydS3AvehYA8objyj0vU/4rwLfXWSXAek2jMRU0AmfrLak39AuGI0/Qi IZsX5r5ZTLxLJnwVEZ2V+VBaE/JiTGSPsreWkllM4rHrEceToWC1qUENrbyDdbJpxxvpId MAVwqcTARvJ3C8KDlM1RLD4uRm6jq4Vk1uKn8hcl2yvRhmL6Uj4PwIKPu0Nabg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791505234; b=WuLMKjSwQ0NJDH3jeDwSbybSg/VdOtvRGkjRetcrJj3q326peTw6MGmLUAMhwJx5D2r+1A HkKZLiVcmSYZ8DW+B/OznxizECV8+tmRsEGUjpCh1Z4fv3ay7VnL++N5vSaqzcvyTbFLhb tNZMmMxOJqI+A/SX9Hf0xCoGoMxMATc4qRoLaLbKbcic1TNdR9He/8ThW8u3FiqSflAIeO 54+NtamNtt2QPrXtBJ76zDUhpKQtzl94/pbCkCnk9j+LriqogoqD6JHInk7LE1zF2s5ai2 wAlQ9XdSRG79OvIndjhMD3NvBAEXVnWI+wNfsVsuejEKbDwnYIQH1o21Ja8P6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791505234; 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=CxWNFTKJfvlEn+WYeJunLE5d5pi01C+ijAjzNhy+JM8=; b=DLhZKlB9WL2Fvn2gN8tlVl/YWLYdfbDbBTeLDYjJnWM0mjwSzcHxrI2Y3K8741O3EXQMVG f1t9+14+NCoPwOXPU6jfoj/XiR79XSbI/KaMXPLdoG7oz37rMMve8/5ymoS6fnsWbMvrOj Vt6MHMRyGB9vz2N626nd2as2nhfYGlxZK7TleJMAeSqbNWERXxAUUlkSzHw/tlpkkHd4ZP ++BWY9M16EHMt4Wpry4LEkqosZBUG28+5TTTOaHZtwKMz/yRqi1RRafAr29ss1RF6aLmLp qQHGASX6g/ijmypzbgQaSjQFbS+MR8F+MMXxukH8EZgHxlp7CdVudKJzv9Nj3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j16vk18rqz12dn for ; Fri, 09 Oct 2026 00:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bb83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Oct 2026 00:20:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: edc101f99c2d - stable/14 - ppp: Reject FSM messages whose length is smaller than the message header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: edc101f99c2d1dafa774d9c78bfc7d23219d95cb Auto-Submitted: auto-generated Date: Fri, 09 Oct 2026 00:20:34 +0000 Message-Id: <6ac83352.1bb83.11adacac@gitrepo.freebsd.org> The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=edc101f99c2d1dafa774d9c78bfc7d23219d95cb commit edc101f99c2d1dafa774d9c78bfc7d23219d95cb Author: John Baldwin AuthorDate: 2026-06-10 13:44:10 +0000 Commit: John Baldwin CommitDate: 2026-10-08 18:23:14 +0000 ppp: Reject FSM messages whose length is smaller than the message header PR: 271843 Reported by: Robert Morris Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D57139 (cherry picked from commit 4d8fde8cff0796f32e659036543aa17d16a15b1b) --- usr.sbin/ppp/fsm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 5c011bef7f4f..060a9149a6af 100644 --- a/usr.sbin/ppp/fsm.c +++ b/usr.sbin/ppp/fsm.c @@ -1060,6 +1060,12 @@ fsm_Input(struct fsm *fp, struct mbuf *bp) m_freem(bp); return; } + if (ntohs(lh.length) < sizeof(lh)) { + log_Printf(LogWARN, "%s: Header length %d is too small - dropped\n", + fp->link->name, (int)ntohs(lh.length)); + m_freem(bp); + return; + } if (lh.code < fp->min_code || lh.code > fp->max_code || lh.code > sizeof FsmCodes / sizeof *FsmCodes) {