Date: Fri, 13 Sep 2019 22:36:04 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352311 - head/sys/netpfil/ipfw Message-ID: <201909132236.x8DMa41h008663@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Sep 13 22:36:04 2019 New Revision: 352311 URL: https://svnweb.freebsd.org/changeset/base/352311 Log: Drivers may pass runt packets to filter. This is okay. Reviewed by: gallatin Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Fri Sep 13 21:28:08 2019 (r352310) +++ head/sys/netpfil/ipfw/ip_fw2.c Fri Sep 13 22:36:04 2019 (r352311) @@ -1448,7 +1448,10 @@ ipfw_chk(struct ip_fw_args *args) do { \ int x = (_len) + T + EHLEN; \ if (mem) { \ - MPASS(pktlen >= x); \ + if (__predict_false(pktlen < x)) { \ + unlock; \ + goto pullup_failed; \ + } \ p = (char *)args->mem + (_len) + EHLEN; \ } else { \ if (__predict_false((m)->m_len < x)) { \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909132236.x8DMa41h008663>