From nobody Thu Feb 2 17:42:34 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 4P75hp5Hhgz3kPdL for ; Thu, 2 Feb 2023 17:42:34 +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 4P75hp4DjNz41g6 for ; Thu, 2 Feb 2023 17:42:34 +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=1675359754; 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=cp8q0h83+i+yqcMDX6td5yArQYuqekRSPNXWCKIFgoY=; b=U4tR+JOSJ2bz6J0+lmXSAeD6H6TD3uRXnMYCuR2dNvqqYbZkhtB1JI+/D7lL8ieFPsy9K1 sSgyezAtv5QzbxLlv9j93eREJcGUp7jsEUfozMOn1+ZXCbFI0No8K2UKoykrogKF6gjwgQ uON30GAFXK2ZICu7xvJp+Q8NzXwNpPog2eMfdmfF7Zf8bLq7OyOvMUPASna9IB7sszDzAw vDHrkfpH476LafU6ZSbzFH/gNkDHPoDnaPawmeEcb0EVNjD4ZbDb2Rg9AsOtMrnKfgWLFi JEuf5ETd+iRuu8FNGP1Sl7GpqfEA6eSaLfaSxgE2WMLuruiKP5DHnt0bKYMgVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675359754; a=rsa-sha256; cv=none; b=c7vhZ4LVcHu7queWiFO/dfuwnxCslWMPW/G96znT20RRf0i5VYoojiNw9cv63D6zX16uit DkHPo1zOXWXn4McdWPn3VXfTmIsvPt3mj2cmXp5oHsJ3rv5uPAsRkh/4v2LVMf9KBz15gN qe8LZPc0ThXh4mwW8uWItlXNxK+Wpg3BLcGgRUoXLrchzkIp9u9dClkZsxPwmOyFGLXhf1 5K2BR4wlVBin93554iBIEnQefR+FeVecKs9TTm4L1Wzkv/O1LOj94r23Y9ViKToZAIiewJ BxfoRzRVViwsF4cCnHwMA14O9rjYngbdEQPKyKuI1Y99FTsvKa1aZH2fj4cclw== 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 4P75hp3JdCz13rl for ; Thu, 2 Feb 2023 17:42:34 +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 312HgYwo066581 for ; Thu, 2 Feb 2023 17:42:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 312HgYXZ066580 for net@FreeBSD.org; Thu, 2 Feb 2023 17:42:34 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, 02 Feb 2023 17:42:34 +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 #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D79f7745c098a766d34a4e072cdd1a06e6= d0829d5 commit 79f7745c098a766d34a4e072cdd1a06e6d0829d5 Author: Cy Schubert AuthorDate: 2023-02-02 00:49:08 +0000 Commit: Cy Schubert CommitDate: 2023-02-02 17:41:22 +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 MFC after: 1 week 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.=