From: Jason Wang <hidden> Date: 2012-05-31 08:07:00
We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.
Cc: stable@vger.kernel.org [2.6.27+]
Signed-off-by: Jason Wang <redacted>
---
net/core/sock.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2012-05-31 22:21:54
From: Jason Wang <redacted>
Date: Thu, 31 May 2012 15:18:10 +0800
We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.
Signed-off-by: Jason Wang <redacted>
Applied and queued up for -stable.
Please do not add explicit stable CC:'s to networking patches, I queue
appropriate changes up myself, and submit them only when I feel that
the change has had sufficient exposure and testing in Linus's tree.
From: Jason Wang <hidden> Date: 2012-06-01 03:08:11
On 06/01/2012 06:21 AM, David Miller wrote:
From: Jason Wang<redacted>
Date: Thu, 31 May 2012 15:18:10 +0800
quoted
We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.
Signed-off-by: Jason Wang<redacted>
Applied and queued up for -stable.
Please do not add explicit stable CC:'s to networking patches, I queue
appropriate changes up myself, and submit them only when I feel that
the change has had sufficient exposure and testing in Linus's tree.