On 7/11/2019 11:15 PM, Prout, Andrew - LLSC - MITLL wrote: 
> I in no way intended to imply that I had confirmed the small SO_SNDBUF was a 
> prerequisite to our problem. With my synthetic test, I was looking for a 
> concise reproducer and trying things to > stress the system.

I've looked into this some more: I am now able to reproduce it consistently (on 
4.14.132) with my synthetic test seemingly regardless of the SO_SNDBUF size 
(tested 128KiB, 512KiB, 1MiB and 10MiB). The key change to make it reproducible 
was to use sendfile() instead of send() - this is what samba was doing in our 
real failure case. Looking at the code, it appears that sendfile() calls into 
the zerocopy functions which only check SNDBUF for memory they allocate (the 
skb structure) - they'll happily "overfill" the send buffer with zerocopy'd 
pages.

In my tests I can see the send buffer used reported by netstat getting to much 
larger values than the SO_SNDBUF value I set (with a 10MiB SO_SNDBUF, it got up 
to ~52MiB on a stalled connection). This of course easily causes the 
CVE-2019-11478 fix to false alarm and the TCP connection to stall.

Reply via email to