[linux] 02/04: Revert "crypto: algif_skcipher - Do not dereference ctx without socket lock"

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Mar 6 22:44:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch wheezy
in repository linux.

commit 7e48a0b505dedd536f3d13def5f78c59f0e9cbaf
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Mar 6 22:10:24 2016 +0000

    Revert "crypto: algif_skcipher - Do not dereference ctx without socket lock"
    
    The backported version is not actually useful and causes regressions -
    or at least the same change did when applied to 3.16.
---
 debian/changelog                                   |  3 ++-
 ...to-algif_skcipher-do-not-dereference-ctx-.patch | 29 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 914c462..f1f596f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -280,7 +280,6 @@ linux (3.2.78-1) UNRELEASED; urgency=medium
     - ocfs2/dlm: clear refmap bit of recovery lock while doing local
       recovery cleanup
     - crypto: user - lock crypto_alg_list on alg dump
-    - crypto: algif_skcipher - Do not dereference ctx without socket lock
     - klist: fix starting point removed bug in klist iterators
     - ALSA: dummy: Implement timer backend switching more safely
     - ALSA: timer: Fix wrong instance passed to slave callbacks
@@ -309,6 +308,8 @@ linux (3.2.78-1) UNRELEASED; urgency=medium
     - net: Make synchronize_rcu_expedited() conditional on
     - sched: Introduce the trace_sched_waking tracepoint
     - rtmutex: Have slowfn of rt_mutex_timed_fastlock() use
+  * Revert "crypto: algif_skcipher - Do not dereference ctx without socket lock"
+    (regression in 3.2.78)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Wed, 02 Mar 2016 15:02:45 +0000
 
diff --git a/debian/patches/bugfix/all/revert-crypto-algif_skcipher-do-not-dereference-ctx-.patch b/debian/patches/bugfix/all/revert-crypto-algif_skcipher-do-not-dereference-ctx-.patch
new file mode 100644
index 0000000..d1c8b12
--- /dev/null
+++ b/debian/patches/bugfix/all/revert-crypto-algif_skcipher-do-not-dereference-ctx-.patch
@@ -0,0 +1,29 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sun, 6 Mar 2016 22:07:37 +0000
+Subject: Revert "crypto: algif_skcipher - Do not dereference ctx without socket lock"
+
+This reverts commit c54ddfbb1b691d77c52b76ca6e13ca7082eb3b82, which
+was a poorly backported version of commit
+6454c2b83f719057069777132b13949e4c6b6350 upstream.  The small part I
+was able to backport makes no sense by itself.
+---
+ crypto/algif_skcipher.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
+index da5d4ed238e2..45fa6bd9187b 100644
+--- a/crypto/algif_skcipher.c
++++ b/crypto/algif_skcipher.c
+@@ -249,11 +249,8 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock,
+ {
+ 	struct sock *sk = sock->sk;
+ 	struct alg_sock *ask = alg_sk(sk);
+-	struct sock *psk = ask->parent;
+-	struct alg_sock *pask = alg_sk(psk);
+ 	struct skcipher_ctx *ctx = ask->private;
+-	struct ablkcipher_tfm *skc = pask->private;
+-	struct crypto_ablkcipher *tfm = skc->base;
++	struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req);
+ 	unsigned ivsize = crypto_ablkcipher_ivsize(tfm);
+ 	struct skcipher_sg_list *sgl;
+ 	struct af_alg_control con = {};
diff --git a/debian/patches/series b/debian/patches/series
index dc4c89b..f16aeff 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1168,3 +1168,4 @@ bugfix/all/aufs-for-4.3-xino-handles-eintr-from-the-dying-proce.patch
 bugfix/all/af_unix-guard-against-other-sk-in-unix_dgram_sendmsg.patch
 debian/hrtimer-fix-abi-change-in-3.2.78.patch
 debian/crypto-fix-abi-change-in-3.2.77.patch
+bugfix/all/revert-crypto-algif_skcipher-do-not-dereference-ctx-.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list