summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2012-07-07 18:48:19 +0000
committerbluhm <bluhm@openbsd.org>2012-07-07 18:48:19 +0000
commit2627cc475fc30a434b463c96b3357d9853c540ba (patch)
treecdda50c47b78209434ac831fc35979d0d39f85d8 /lib/libc
parentremove incorrect check in pfctl preventing set-tos for ipvshit. (diff)
downloadwireguard-openbsd-2627cc475fc30a434b463c96b3357d9853c540ba.tar.xz
wireguard-openbsd-2627cc475fc30a434b463c96b3357d9853c540ba.zip
Fix two races in socket splicing. When somove() gets called from
sosplice() to move the data already there, it might sleep in m_copym(). Another process must not unsplice during that sleep, so also lock the receive buffer when sosplice is called with fd -1. The same sleep can allow network interrupts to modify the socket buffer. So use sbsync() to write back modifications within the loop instead of fixing the socket buffer after the loop. OK claudio@
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions