| Summary: | ipfw: tcpdatalen does not exactly match IPv6 packets. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Tatsuki Makino <tatsuki_makino> | ||||||||||
| Component: | kern | Assignee: | Andrey V. Elsukov <ae> | ||||||||||
| Status: | Closed FIXED | ||||||||||||
| Severity: | Affects Only Me | CC: | ae | ||||||||||
| Priority: | --- | Keywords: | patch | ||||||||||
| Version: | CURRENT | ||||||||||||
| Hardware: | Any | ||||||||||||
| OS: | Any | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Tatsuki Makino
2017-10-03 06:01:02 UTC
Created attachment 186894 [details] patch for CURRENT attachment 186874 [details] reused the variable iplen. But iplen overflows when ip6_plen is greater than 65495. The new patch does not use the sum of header size and payload size. (In reply to Tatsuki Makino from comment #1) > Created attachment 186894 [details] > patch for CURRENT > > attachment 186874 [details] reused the variable iplen. But iplen overflows > when ip6_plen is greater than 65495. > The new patch does not use the sum of header size and payload size. You need to handle the case when ip6_plen == 0. Created attachment 186915 [details] patch for CURRENT (In reply to Andrey V. Elsukov from comment #2) Thank you. I made a new one. How about this one? Created attachment 187283 [details]
Proposed patch for tcplen
Can you test this patch instead?
(In reply to Andrey V. Elsukov from comment #4) attachment 187283 [details] can be applied to stable/10. I am using it on the following uname -a. FreeBSD T2.test 10.4-STABLE FreeBSD 10.4-STABLE #0 r324782M: Fri Oct 20 02:30:37 UTC 2017 root@T2.test:/usr/obj/usr/src/sys/GENERIC amd64 It works as expected. A commit references this bug: Author: ae Date: Tue Oct 24 08:39:06 UTC 2017 New revision: 324947 URL: https://svnweb.freebsd.org/changeset/base/324947 Log: Add IPv6 support for O_TCPDATALEN opcode. PR: 222746 MFC after: 1 week Changes: head/sys/netpfil/ipfw/ip_fw2.c A commit references this bug: Author: ae Date: Tue Oct 31 10:31:47 UTC 2017 New revision: 325229 URL: https://svnweb.freebsd.org/changeset/base/325229 Log: MFC r324947: Add IPv6 support for O_TCPDATALEN opcode. PR: 222746 Changes: _U stable/11/ stable/11/sys/netpfil/ipfw/ip_fw2.c A commit references this bug: Author: ae Date: Tue Oct 31 11:09:39 UTC 2017 New revision: 325230 URL: https://svnweb.freebsd.org/changeset/base/325230 Log: MFC r324947: Add IPv6 support for O_TCPDATALEN opcode. PR: 222746 Changes: _U stable/10/ stable/10/sys/netpfil/ipfw/ip_fw2.c Fixed in head/, stable/11 and stable/10. Thanks! |