summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Wellving <andreas.wellving@enea.com>2019-05-21 16:18:43 +0200
committerAdrian Mangeac <Adrian.Mangeac@enea.com>2019-05-21 17:37:15 +0200
commitcaa91d5e4f58311581a830ddc89c73e07df71387 (patch)
treee71a475f035b6c112ef64712719dd023160d12f6
parentda9582884e55558308fd67ade22a4f9eac1750a9 (diff)
downloadenea-kernel-cache-caa91d5e4f58311581a830ddc89c73e07df71387.tar.gz
dccp: CVE-2017-8824
dccp: CVE-2017-8824: use-after-free in DCCP code Reference: https://nvd.nist.gov/vuln/detail/CVE-2017-8824 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=e5e1e153ecd40c2b09c23d2b2c161a6c8ddbba07 Change-Id: Ic8d564518bde1ca36f0b9c54f1fa603e8778c92b Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
-rw-r--r--patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch b/patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
new file mode 100644
index 0000000..964e1c1
--- /dev/null
+++ b/patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch
@@ -0,0 +1,49 @@
1From e5e1e153ecd40c2b09c23d2b2c161a6c8ddbba07 Mon Sep 17 00:00:00 2001
2From: Mohamed Ghannam <simo.ghannam@gmail.com>
3Date: Tue, 5 Dec 2017 20:58:35 +0000
4Subject: [PATCH] dccp: CVE-2017-8824: use-after-free in DCCP code
5
6commit 69c64866ce072dea1d1e59a0d61e0f66c0dffb76 upstream.
7
8Whenever the sock object is in DCCP_CLOSED state,
9dccp_disconnect() must free dccps_hc_tx_ccid and
10dccps_hc_rx_ccid and set to NULL.
11
12CVE: CVE-2017-8824
13Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.14.y&id=e5e1e153ecd40c2b09c23d2b2c161a6c8ddbba07]
14
15Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
16Reviewed-by: Eric Dumazet <edumazet@google.com>
17Signed-off-by: David S. Miller <davem@davemloft.net>
18Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
20---
21 net/dccp/proto.c | 5 +++++
22 1 file changed, 5 insertions(+)
23
24diff --git a/net/dccp/proto.c b/net/dccp/proto.c
25index b68168fcc06a..9d43c1f40274 100644
26--- a/net/dccp/proto.c
27+++ b/net/dccp/proto.c
28@@ -259,6 +259,7 @@ int dccp_disconnect(struct sock *sk, int flags)
29 {
30 struct inet_connection_sock *icsk = inet_csk(sk);
31 struct inet_sock *inet = inet_sk(sk);
32+ struct dccp_sock *dp = dccp_sk(sk);
33 int err = 0;
34 const int old_state = sk->sk_state;
35
36@@ -278,6 +279,10 @@ int dccp_disconnect(struct sock *sk, int flags)
37 sk->sk_err = ECONNRESET;
38
39 dccp_clear_xmit_timers(sk);
40+ ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
41+ ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
42+ dp->dccps_hc_rx_ccid = NULL;
43+ dp->dccps_hc_tx_ccid = NULL;
44
45 __skb_queue_purge(&sk->sk_receive_queue);
46 __skb_queue_purge(&sk->sk_write_queue);
47--
482.20.1
49