https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266442

--- Comment #9 from commit-h...@freebsd.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=1da7a8a066150bf132b3e1a48fad009212a0010a

commit 1da7a8a066150bf132b3e1a48fad009212a0010a
Author:     Cy Schubert <c...@freebsd.org>
AuthorDate: 2023-02-02 00:49:08 +0000
Commit:     Cy Schubert <c...@freebsd.org>
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 length
    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_fastfwd.c
    as it tries to use a now previously freed, by m_pullup(), mbuf.

    PR:             266442
    Reported by:    Robert Morris <r...@lcs.mit.edu>

    (cherry picked from commit 79f7745c098a766d34a4e072cdd1a06e6d0829d5)

 sys/netpfil/ipfilter/netinet/fil.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to