From nobody Sun Mar 3 16:30:20 2024 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 4TnnP843DTz5BrVT for ; Sun, 3 Mar 2024 16:30:20 +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 4TnnP772Cdz4S4f for ; Sun, 3 Mar 2024 16:30:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709483420; a=rsa-sha256; cv=none; b=IIwwd0sbDM7q21LiMvieNbvn9PJvmoLvjPaCbg59TCyigyt3F/K8ZEnHr4btQDFUi4ln2h FoRXi1hqBTV5ObAoGnRa01s04NFVngaaxl2GUPosty6jRO/Qncppw7ovm0QZce4KGIH9FF J2QM6EUyncs5bVMDFHr7a+vMikMdFPjcPEiGs0mWRG22rBjfZ2HfZY6W60uPw0b9IGjVqQ XOAR2lT/Ql6RcgiopiaTjZy/sjaNDEnIKlbS/3TaQihxpF29zFcamB436WEoeT1ugWT9It 8zh90TZ6no75PEmjDJXElKFWoG2uPKRgo7r9ksdUvWqISc2zFIdo9POQpLU7UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709483420; 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=JvzhtSVVnNlYd84WkjJh+x6PRxxwFtmQA7Ei3xMs7Ak=; b=BM7k8qmUa+DcOczafu5ZUjrdUXSTJHzA9307YKak9MZM804gp0Z6Y4kWZ4rE7V48BWHnw/ rinunriqPdi2z6eLhxTCiEHU8ZLS1b+C1NHfhYE0cL0cEaT3MDyUczPGirpcPoTkNGzPr5 GeNc3HxJ+0nJh1rnxPIUVsPc7iF0xq102gL4a6A2/2DFjG4ra5ON5ML9mQwiSdCWdhFYTg nEtWEzxNtN3G8UvaOBxduQQZxrviurPR5PB91VdgUqTyJ6s6D5O7RExO8wrVS2/7KpZzMI zxcl2JiGOdAqlhuDuZBZAOgM6j0QlSVUy/Z3J0muj65sqy0iqLVeQWE31IYxbw== 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 4TnnP76fSWzlvs for ; Sun, 3 Mar 2024 16:30:19 +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 423GUJnT062976 for ; Sun, 3 Mar 2024 16:30:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 423GUJhe062975 for bugs@FreeBSD.org; Sun, 3 Mar 2024 16:30:19 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 277456] netipsec: kdebug_sadb invalid length check for sadb_ext_len Date: Sun, 03 Mar 2024 16:30:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: me@tobhe.de 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 attachments.created 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277456 Bug ID: 277456 Summary: netipsec: kdebug_sadb invalid length check for sadb_ext_len Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: me@tobhe.de Created attachment 248900 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D248900&action= =3Dedit Patch Besides not doing any sufficient check that the length of a parsed message = is not bigger than the actual allocated buffer, kdebug_sadb() incorrectly comp= ares ext->sadb_ext_len, the extension payload size in 8 byte chunks, with tlen, which is the full message payload size in bytes. This should compare PFKEY_UNUNIT64(ext->sadb_ext_len) with tlen instead. fix attached. --=20 You are receiving this mail because: You are the assignee for the bug.=