This is a note to let you know that I've just added the patch titled
iovec: make sure the caller actually wants anything in memcpy_fromiovecend
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iovec-make-sure-the-caller-actually-wants-anything-in-memcpy_fromiovecend.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From foo@baz Fri Aug 8 08:48:58 PDT 2014
From: Sasha Levin <[email protected]>
Date: Thu, 31 Jul 2014 23:00:35 -0400
Subject: iovec: make sure the caller actually wants anything in
memcpy_fromiovecend
From: Sasha Levin <[email protected]>
[ Upstream commit 06ebb06d49486676272a3c030bfeef4bd969a8e6 ]
Check for cases when the caller requests 0 bytes instead of running off
and dereferencing potentially invalid iovecs.
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/core/iovec.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/core/iovec.c
+++ b/net/core/iovec.c
@@ -107,6 +107,10 @@ EXPORT_SYMBOL(memcpy_toiovecend);
int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
int offset, int len)
{
+ /* No data? Done! */
+ if (len == 0)
+ return 0;
+
/* Skip over the finished iovecs */
while (offset >= iov->iov_len) {
offset -= iov->iov_len;
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/net-sendmsg-fix-null-pointer-dereference.patch
queue-3.10/iovec-make-sure-the-caller-actually-wants-anything-in-memcpy_fromiovecend.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html