summaryrefslogtreecommitdiffstats
path: root/fs/qnx6
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-11-27 15:40:21 +0300
committerDavid S. Miller <davem@davemloft.net>2013-11-29 16:12:52 -0500
commitdb31c55a6fb245fdbb752a2ca4aefec89afabb06 (patch)
treeab94a0065aaa0db14bdca1ae6c92b6e29a086165 /fs/qnx6
parentec6f809ff6f19fafba3212f6aff0dda71dfac8e8 (diff)
downloadblackbird-op-linux-db31c55a6fb245fdbb752a2ca4aefec89afabb06.tar.gz
blackbird-op-linux-db31c55a6fb245fdbb752a2ca4aefec89afabb06.zip
net: clamp ->msg_namelen instead of returning an error
If kmsg->msg_namelen > sizeof(struct sockaddr_storage) then in the original code that would lead to memory corruption in the kernel if you had audit configured. If you didn't have audit configured it was harmless. There are some programs such as beta versions of Ruby which use too large of a buffer and returning an error code breaks them. We should clamp the ->msg_namelen value instead. Fixes: 1661bf364ae9 ("net: heap overflow in __audit_sockaddr()") Reported-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Eric Wong <normalperson@yhbt.net> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/qnx6')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud