s3: nmbd: Fix bug 10633 - nmbd denial of service
authorJeremy Allison <jra@samba.org>
Wed, 28 May 2014 17:40:27 +0000 (10:40 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 24 Jun 2014 23:33:13 +0000 (01:33 +0200)
commitd77a74237e660dd2ce9f1e14b02635f8a2569653
treee65a8c6280300954efecf12e17fa6e201950d996
parentd097898020c77c34c99cda17f386d445c7980bed
s3: nmbd: Fix bug 10633 - nmbd denial of service

The Linux kernel has a bug in that it can give spurious
wakeups on a non-blocking UDP socket for a non-deliverable packet.

When nmbd was changed to use non-blocking sockets it
became vulnerable to a spurious wakeup from poll/epoll.

Fix sys_recvfile() to return on EWOULDBLOCK/EAGAIN.

CVE-2014-0244

https://bugzilla.samba.org/show_bug.cgi?id=10633

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/lib/system.c