From nobody Tue Aug 08 20:01:59 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 4RL3xM2xv6z4q1yY for ; Tue, 8 Aug 2023 20:01:59 +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 4RL3xM1k0bz4jpZ for ; Tue, 8 Aug 2023 20:01:59 +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=1691524919; 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=9GZkrUNlSkrs1Z78Q6c5aFFAXkCutVyUxbJDq+KQF0g=; b=BL3gtm6Vnnd3SO/xOFquoKmsybIMjasqPr/djdoSMs4pt5/pvEMYNBs0wTg88gCD36ULZe BClgww0eKPM5wkNyK1NtJCvens/CQGNuxMlbTfqoaiMyzlbBjdhddi7zJGMGNhCY2x+WFz +b2Ig9wsPb9fSVHZTmC/OloJWlvtS0B+zxNSRmv0HhBL7fALKHMhEZhZEBHjt/aJ8c6tr8 uZX+hK6RzrcJO1X7ula5KNlNt88JQS49mjtC48RL0KuBQUCFO+SM5RsYqOERGZMjXfTW4z RbhKSYsCTZ+oZ56tuN2BSxG7ll9nMkshoP5ZFaNDFxjUtKEDhC5/1rx9cdHi+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691524919; a=rsa-sha256; cv=none; b=d02lokAPaHp1FSbEPieLLFaOBwaAprTcniQZ6Du6WYhJBts1CK6/2pFtqeIlseGhN9k+Oh fRAhcIMWMAK6RsUILYr2EgSNcqwTto8s2HW0eljuvlxCLOQHtgcOUBm/dVhfndears8hqK VNTvnEPT6tTiNHH+/wZpPDCDFBgExuORP8vxtme28P4UwawRnt6tFZ5B2xJVAMxMMKKfHJ d6jCzujOie/RWN8Ez/fPcTv8Al+Nrh3jKUZAeOnEAW73cQrj8oH0Vcy9UPdRsXaCB+moXJ rCJDVZSnZu2WB+RsXYHROFKnKyB6hrgTdojahv7V73wMau1S+E4XZmV7Mvv+pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RL3xM0pHnznDb for ; Tue, 8 Aug 2023 20:01:59 +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 378K1xhD086267 for ; Tue, 8 Aug 2023 20:01:59 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 378K1xSh086265 for net@FreeBSD.org; Tue, 8 Aug 2023 20:01:59 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: net@FreeBSD.org Subject: [Bug 105943] Network stack may modify read-only mbuf chain copies Date: Tue, 08 Aug 2023 20:01:59 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 7.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: net@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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D105943 --- Comment #7 from Ed Maste --- ip_mloopback: /* * Make a deep copy of the packet because we're going to * modify the pack in order to generate checksums. */ copym =3D m_dup(m, M_NOWAIT); ... if_simloop(ifp, copym, AF_INET, 0); pim6_input: mcp =3D m_copym(m, 0, off + PIM6_REG_MINLEN, M_NOWAIT); ... if_simloop(mif6table[reg_mif_num].m6_ifp, m, dst.sin6_family, 0); ip6_mloopback: copym =3D m_copym(m, 0, M_COPYALL, M_NOWAIT); ... /* * Make sure to deep-copy IPv6 header portion in case the data * is in an mbuf cluster, so that we can safely override the IPv6 * header portion later. */ if (!M_WRITABLE(copym) || copym->m_len < sizeof(struct ip6_hdr)) { copym =3D m_pullup(copym, sizeof(struct ip6_hdr)); if (copym =3D=3D NULL) return; } ... if_simloop(ifp, copym, AF_INET6, 0); --=20 You are receiving this mail because: You are the assignee for the bug.=