Fix CVE-2019-8912 : net: crypto set sk to NULL when af_alg_release. : 9060cb719e61b6...
authorRISCi_ATOM <bob@bobcall.me>
Wed, 20 Feb 2019 23:48:27 +0000 (18:48 -0500)
committerRISCi_ATOM <bob@bobcall.me>
Wed, 20 Feb 2019 23:48:27 +0000 (18:48 -0500)
target/linux/generic/patches-4.4/999-fix_cve-2019-8912.patch [new file with mode: 0644]

diff --git a/target/linux/generic/patches-4.4/999-fix_cve-2019-8912.patch b/target/linux/generic/patches-4.4/999-fix_cve-2019-8912.patch
new file mode 100644 (file)
index 0000000..8e04cc3
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/crypto/af_alg.c
++++ b/crypto/af_alg.c
+@@ -121,8 +121,10 @@ static void alg_do_release(const struct
+ int af_alg_release(struct socket *sock)
+ {
+-      if (sock->sk)
++      if (sock->sk) {
+               sock_put(sock->sk);
++              sock->sk = NULL;
++      }
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(af_alg_release);