diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-22 07:07:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-22 07:07:46 -0700 |
commit | 7790ff45be89b6a3ed98bb8c0572255ad4ed7a28 (patch) | |
tree | bf3edc17fb419c9cc326d3d72da6cf8b729ef1ab /crypto | |
parent | 60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff) | |
parent | 72a763d805a48ac8c0bf48fdb510e84c12de51fe (diff) | |
download | linux-7790ff45be89b6a3ed98bb8c0572255ad4ed7a28.tar.gz linux-7790ff45be89b6a3ed98bb8c0572255ad4ed7a28.tar.bz2 linux-7790ff45be89b6a3ed98bb8c0572255ad4ed7a28.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
"This fixes a kernel memory leak in the algif interface"
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: algif - suppress sending source address information in recvmsg
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algif_hash.c | 2 | ||||
-rw-r--r-- | crypto/algif_skcipher.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index ef5356cd280a..0262210cad38 100644 --- a/crypto/algif_hash.c +++ b/crypto/algif_hash.c @@ -161,6 +161,8 @@ static int hash_recvmsg(struct kiocb *unused, struct socket *sock, else if (len < ds) msg->msg_flags |= MSG_TRUNC; + msg->msg_namelen = 0; + lock_sock(sk); if (ctx->more) { ctx->more = 0; diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 6a6dfc062d2a..a1c4f0a55583 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -432,6 +432,7 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, long copied = 0; lock_sock(sk); + msg->msg_namelen = 0; for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0; iovlen--, iov++) { unsigned long seglen = iov->iov_len; |