[Bug 224218] Kernel panic in SCTP/IpV6 server mode

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jul 10 17:08:51 UTC 2020


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

Mark Johnston <markj at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj at FreeBSD.org
         Resolution|---                         |Overcome By Events
             Status|In Progress                 |Closed

--- Comment #25 from Mark Johnston <markj at FreeBSD.org> ---
Closing since the default stack size was increased on i386.

The two major offenders in SCTP, sctp_auth_get_cookie_params() and
sctp_load_addresses_from_init() are still there.  They both allocate 3 512-byte
buffers on the stack.  I can't see an easy way to fix that; all three buffers
are used to temporarily store data until we know the combined size of the data,
at which point a buffer to store all of it is allocated.

It might be possible to avoid the temporary buffers by using m_pulldown() to
ensure that the parameter headers are contiguous, and then use m_copydata() to
copy data into the key buffer once we know the combined length.  This is a bit
tricky to get right and I have no setup to test such a change.  However, it
would shave 1536 bytes off the stack frame and avoid some extra copying.

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


More information about the freebsd-net mailing list