[Bug 195883] New: Incorrect handling of errors in tcp_output() function

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 11 08:45:18 UTC 2014


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

            Bug ID: 195883
           Summary: Incorrect handling of errors in tcp_output() function
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: hselasky at FreeBSD.org

Created attachment 150466
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150466&action=edit
Suggested patch

Hi,

In the tcp_output() function, nothing is protecting TCP timers from elapsing
during its execution. Under certain conditions a TCP timeout can overlap
if_transmit() and iff the if_transmit() function returns non-zero in that case,
the following repeated check will give a different outcome than previously:

((tp->t_flags & TF_FORCEDATA) == 0 ||
!tcp_timer_active(tp, TT_PERSIST))

This leads up to a panic where the inpcb transmit state gets corrupted.

Suggested solution:
Store outcome from previous check and use that result later on.

--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list