diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-22 10:07:46 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-22 10:07:46 -0400 |
| commit | 7790ff45be89b6a3ed98bb8c0572255ad4ed7a28 (patch) | |
| tree | bf3edc17fb419c9cc326d3d72da6cf8b729ef1ab /crypto | |
| parent | 60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff) | |
| parent | 72a763d805a48ac8c0bf48fdb510e84c12de51fe (diff) | |
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, | |||
| 161 | else if (len < ds) | 161 | else if (len < ds) |
| 162 | msg->msg_flags |= MSG_TRUNC; | 162 | msg->msg_flags |= MSG_TRUNC; |
| 163 | 163 | ||
| 164 | msg->msg_namelen = 0; | ||
| 165 | |||
| 164 | lock_sock(sk); | 166 | lock_sock(sk); |
| 165 | if (ctx->more) { | 167 | if (ctx->more) { |
| 166 | ctx->more = 0; | 168 | 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, | |||
| 432 | long copied = 0; | 432 | long copied = 0; |
| 433 | 433 | ||
| 434 | lock_sock(sk); | 434 | lock_sock(sk); |
| 435 | msg->msg_namelen = 0; | ||
| 435 | for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0; | 436 | for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0; |
| 436 | iovlen--, iov++) { | 437 | iovlen--, iov++) { |
| 437 | unsigned long seglen = iov->iov_len; | 438 | unsigned long seglen = iov->iov_len; |
