From nobody Thu Feb 09 21:20:24 2023 X-Original-To: net@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 4PCVBw2bqZz3nl67 for ; Thu, 9 Feb 2023 21:20:24 +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 4PCVBw0zjzz477b for ; Thu, 9 Feb 2023 21:20:24 +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=1675977624; 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: in-reply-to:in-reply-to:references:references; bh=yhToOLqvb5y1VKV0ZiHIa1zsI7PJoau+nNE63h3mcBI=; b=D6dJ9h6+5kLC5NBaHJColkCY88aJGtVMdDZjaKt8sxtTpn2I3CUJo26LIZ5HeTq+rNrgqs pHwZfJ06L9ygSAJkMFLN3EiqKSl7i1IhmqYmobg6yHzQPSOSobxTqqU06XTAWC+iK4dfjb y6RGuci2h8r2K7R3z0ul+mJJu4sHJkiDrwVeiXAgpFAvEfpIJeHx9rtK8LUYADv0e1McIX wHd4zSFKiMmyiED0tjXfE5HqsCNgfnfRA/oYZFHrEDhkIziT33WV/T4gjbBMH5ndoC8TFV COZEkrrhp2+w+hXkd4daYAO3+lkS5YP827/3JToMPyrA8KjvKTSB064cplmTRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675977624; a=rsa-sha256; cv=none; b=LnYPuLvnPKfojU7dMks8X18rtFVV21abHJ5VTwt8c4aoGi8SZYDJkyNvOnde+nUJ8AvHHI es169tewstfKQAp47W/KufWyyBsG2SuN8U2tF94S0MC+R4eNx2Glm4VBT6UenkqKxzBHV1 8zZbrkGKTwHh4LNMj0vjkdKqsnCvvr0BIG4E/psW2Z5pK49Bj30P52faDRC9YIC9zPw1ky kcWpp1KGkgqtFHnt1i1i5hx4XpCS1pj9Y4RG77aIsNAjUYjWN8hWjehWxPd6MhELW2H8OF 29jpNLaCOTpswlhmgiIrlT5fWFTXRo5jLJEE3MCjh6BOcXLBBGmpo38nLi8kfQ== 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 4PCVBw04BczsYh for ; Thu, 9 Feb 2023 21:20:24 +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 319LKNBm080222 for ; Thu, 9 Feb 2023 21:20:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 319LKNwt080221 for net@FreeBSD.org; Thu, 9 Feb 2023 21:20:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 266442] kernel page fault on packet with broken lengths if ipfilter is loaded Date: Thu, 09 Feb 2023 21:20:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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 Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: cy@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266442 --- Comment #9 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D1da7a8a066150bf132b3e1a48fad00921= 2a0010a commit 1da7a8a066150bf132b3e1a48fad009212a0010a Author: Cy Schubert AuthorDate: 2023-02-02 00:49:08 +0000 Commit: Cy Schubert CommitDate: 2023-02-09 21:19:41 +0000 ipfilter: Fix use after free on packet with broken lengths Under the scenario with a packet with length of 67 bytes, a header leng= th using the default of 20 bytes and a TCP data offset (th_off) of 48 will cause m_pullup() to fail to make sure bytes are arragned contiguously. m_pullup() will free the mbuf chain and return a null. ipfilter stores the resultant mbuf address (or the resulting NULL) in its fr_info_t structure. Unfortuntely the eroneous packet is not flagged for drop. This results in a kernel page fault at line 410 of sys/netinet/ip_fastf= wd.c as it tries to use a now previously freed, by m_pullup(), mbuf. PR: 266442 Reported by: Robert Morris (cherry picked from commit 79f7745c098a766d34a4e072cdd1a06e6d0829d5) sys/netpfil/ipfilter/netinet/fil.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=