Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Aug 2023 20:01:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 105943] Network stack may modify read-only mbuf chain copies
Message-ID:  <bug-105943-7501-qkV5ki7aBH@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-105943-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-105943-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D105943

--- Comment #7 from Ed Maste <emaste@freebsd.org> ---
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-105943-7501-qkV5ki7aBH>