]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()
authorAl Viro <viro@ZenIV.linux.org.uk>
Sat, 14 Mar 2015 05:34:56 +0000 (05:34 +0000)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 11:13:45 +0000 (13:13 +0200)
commit9b79f2c1170b4d2475a18f943ea746cb4c0c43be
tree64c97e9cba14d4de2fab32d29cc70f75cabdeac4
parente0704a3c29413a811469e0e412ba641b390837ec
rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()

[ Upstream commit 7d985ed1dca5c90535d67ce92ef6ca520302340a ]

[I would really like an ACK on that one from dhowells; it appears to be
quite straightforward, but...]

MSG_PEEK isn't passed to ->recvmsg() via msg->msg_flags; as the matter of
fact, neither the kernel users of rxrpc, nor the syscalls ever set that bit
in there.  It gets passed via flags; in fact, another such check in the same
function is done correctly - as flags & MSG_PEEK.

It had been that way (effectively disabled) for 8 years, though, so the patch
needs beating up - that case had never been tested.  If it is correct, it's
-stable fodder.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/rxrpc/ar-recvmsg.c