From: Greg Kroah-Hartman Date: Mon, 10 Nov 2014 22:11:15 +0000 (+0900) Subject: 3.10-stable patches X-Git-Tag: v3.10.60~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e80251d55ff67db1e8c1592be16340af29fe0c0f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: crypto-algif-avoid-excessive-use-of-socket-buffer-in-skcipher.patch --- diff --git a/queue-3.10/crypto-algif-avoid-excessive-use-of-socket-buffer-in-skcipher.patch b/queue-3.10/crypto-algif-avoid-excessive-use-of-socket-buffer-in-skcipher.patch new file mode 100644 index 00000000000..c412c7acc4f --- /dev/null +++ b/queue-3.10/crypto-algif-avoid-excessive-use-of-socket-buffer-in-skcipher.patch @@ -0,0 +1,34 @@ +From e2cffb5f493a8b431dc87124388ea59b79f0bccb Mon Sep 17 00:00:00 2001 +From: Ondrej Kozina +Date: Mon, 25 Aug 2014 11:49:54 +0200 +Subject: crypto: algif - avoid excessive use of socket buffer in skcipher + +From: Ondrej Kozina + +commit e2cffb5f493a8b431dc87124388ea59b79f0bccb upstream. + +On archs with PAGE_SIZE >= 64 KiB the function skcipher_alloc_sgl() +fails with -ENOMEM no matter what user space actually requested. +This is caused by the fact sock_kmalloc call inside the function tried +to allocate more memory than allowed by the default kernel socket buffer +size (kernel param net.core.optmem_max). + +Signed-off-by: Ondrej Kozina +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + crypto/algif_skcipher.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/crypto/algif_skcipher.c ++++ b/crypto/algif_skcipher.c +@@ -49,7 +49,7 @@ struct skcipher_ctx { + struct ablkcipher_request req; + }; + +-#define MAX_SGL_ENTS ((PAGE_SIZE - sizeof(struct skcipher_sg_list)) / \ ++#define MAX_SGL_ENTS ((4096 - sizeof(struct skcipher_sg_list)) / \ + sizeof(struct scatterlist) - 1) + + static inline int skcipher_sndbuf(struct sock *sk) diff --git a/queue-3.10/series b/queue-3.10/series index 7c13e63ba3c..8c0dde2227b 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -109,3 +109,4 @@ mac80211-fix-typo-in-starting-baserate-for-rts_cts_rate_idx.patch posix-timers-fix-stack-info-leak-in-timer_create.patch x86-apic-handle-a-bad-tsc-more-gracefully.patch mm-remove-false-warn_on-from-pagecache_isize_extended.patch +crypto-algif-avoid-excessive-use-of-socket-buffer-in-skcipher.patch