diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2011-08-04 14:07:40 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-15 18:31:33 -0700 |
commit | 5b47b8038f183b44d2d8ff1c7d11a5c1be706b34 (patch) | |
tree | 1bbf8c17e07c59a744e8f7005f3fe5936b871d89 /firmware/keyspan/usa18x.HEX | |
parent | 91f620f98412f866b385b16681d5e59b7e62e343 (diff) | |
download | kernel_samsung_smdk4412-5b47b8038f183b44d2d8ff1c7d11a5c1be706b34.tar.gz kernel_samsung_smdk4412-5b47b8038f183b44d2d8ff1c7d11a5c1be706b34.tar.bz2 kernel_samsung_smdk4412-5b47b8038f183b44d2d8ff1c7d11a5c1be706b34.zip |
net: Fix security_socket_sendmsg() bypass problem.
commit c71d8ebe7a4496fb7231151cb70a6baa0cb56f9a upstream.
The sendmmsg() introduced by commit 228e548e "net: Add sendmmsg socket system
call" is capable of sending to multiple different destination addresses.
SMACK is using destination's address for checking sendmsg() permission.
However, security_socket_sendmsg() is called for only once even if multiple
different destination addresses are passed to sendmmsg().
Therefore, we need to call security_socket_sendmsg() for each destination
address rather than only the first destination address.
Since calling security_socket_sendmsg() every time when only single destination
address was passed to sendmmsg() is a waste of time, omit calling
security_socket_sendmsg() unless destination address of previous datagram and
that of current datagram differs.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'firmware/keyspan/usa18x.HEX')
0 files changed, 0 insertions, 0 deletions