diff options
author | Andreas Wellving <andreas.wellving@enea.com> | 2018-10-12 09:31:46 +0200 |
---|---|---|
committer | Andreas Wellving <Andreas.Wellving@enea.com> | 2018-10-15 16:29:04 +0200 |
commit | 95d84ee1a0a2ed3b39cd6a636d4ebcd3e33cd193 (patch) | |
tree | 9dff574d61ac9c94c53b5bf476c5d795c8072a0f | |
parent | 307a37fe48bfc9ce3297526b6d6e7d1bf1758448 (diff) | |
download | enea-kernel-cache-95d84ee1a0a2ed3b39cd6a636d4ebcd3e33cd193.tar.gz |
dccp: CVE-2017-8824
dccp: use-after-free in DCCP code
References:
https://lists.openwall.net/netdev/2017/12/04/224
Change-Id: I5653c05e22956df9ef614147e79af4f749e4294a
Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
-rw-r--r-- | patches/cve/4.9.x.scc | 1 | ||||
-rw-r--r-- | patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/patches/cve/4.9.x.scc b/patches/cve/4.9.x.scc index 4fa6185..96b6bcd 100644 --- a/patches/cve/4.9.x.scc +++ b/patches/cve/4.9.x.scc | |||
@@ -1,2 +1,3 @@ | |||
1 | #CVEs fixed in 4.9.82: | 1 | #CVEs fixed in 4.9.82: |
2 | patch CVE-2017-18344-posix-timer-Properly-check-sigevent-sigev_notify.patch | 2 | patch CVE-2017-18344-posix-timer-Properly-check-sigevent-sigev_notify.patch |
3 | patch CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch | ||
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..4aea4a1 --- /dev/null +++ b/patches/cve/CVE-2017-8824-dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 69c64866ce072dea1d1e59a0d61e0f66c0dffb76 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mohamed Ghannam <simo.ghannam@gmail.com> | ||
3 | Date: Tue, 5 Dec 2017 20:58:35 +0000 | ||
4 | Subject: [PATCH] dccp: CVE-2017-8824: use-after-free in DCCP code | ||
5 | |||
6 | Whenever the sock object is in DCCP_CLOSED state, | ||
7 | dccp_disconnect() must free dccps_hc_tx_ccid and | ||
8 | dccps_hc_rx_ccid and set to NULL. | ||
9 | |||
10 | CVE: CVE-2017-8824 | ||
11 | Upstream-Status: Backport | ||
12 | |||
13 | Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> | ||
14 | Reviewed-by: Eric Dumazet <edumazet@google.com> | ||
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
16 | Signed-off-by: Andreas Wellving <andreas.wellving@enea.com> | ||
17 | --- | ||
18 | net/dccp/proto.c | 5 +++++ | ||
19 | 1 file changed, 5 insertions(+) | ||
20 | |||
21 | diff --git a/net/dccp/proto.c b/net/dccp/proto.c | ||
22 | index b68168f..9d43c1f 100644 | ||
23 | --- a/net/dccp/proto.c | ||
24 | +++ b/net/dccp/proto.c | ||
25 | @@ -259,6 +259,7 @@ int dccp_disconnect(struct sock *sk, int flags) | ||
26 | { | ||
27 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
28 | struct inet_sock *inet = inet_sk(sk); | ||
29 | + struct dccp_sock *dp = dccp_sk(sk); | ||
30 | int err = 0; | ||
31 | const int old_state = sk->sk_state; | ||
32 | |||
33 | @@ -278,6 +279,10 @@ int dccp_disconnect(struct sock *sk, int flags) | ||
34 | sk->sk_err = ECONNRESET; | ||
35 | |||
36 | dccp_clear_xmit_timers(sk); | ||
37 | + ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); | ||
38 | + ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); | ||
39 | + dp->dccps_hc_rx_ccid = NULL; | ||
40 | + dp->dccps_hc_tx_ccid = NULL; | ||
41 | |||
42 | __skb_queue_purge(&sk->sk_receive_queue); | ||
43 | __skb_queue_purge(&sk->sk_write_queue); | ||
44 | -- | ||
45 | |||
46 | |||