diff options
author | Alexandre Oliva <lxoliva@fsfla.org> | 2017-12-27 20:02:29 +0000 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2017-12-27 20:02:29 +0000 |
commit | 84f39c40e2a35681a0c7915c636406282af5c22b (patch) | |
tree | cb5ae2563bebcb9eb3b5f8c039ed984884304ac8 /freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch | |
parent | ba43b3ea22e1ffec166d4fc3540476d5cebf66bd (diff) | |
download | linux-libre-raptor-84f39c40e2a35681a0c7915c636406282af5c22b.tar.gz linux-libre-raptor-84f39c40e2a35681a0c7915c636406282af5c22b.zip |
tag 4.14.9-300.fc27.gnu
Diffstat (limited to 'freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch')
-rw-r--r-- | freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch b/freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch new file mode 100644 index 000000000..192e4358f --- /dev/null +++ b/freed-ora/tags/f27/4.14.9-300.fc27.gnu/dccp-CVE-2017-8824-use-after-free-in-DCCP-code.patch @@ -0,0 +1,43 @@ +From 69c64866ce072dea1d1e59a0d61e0f66c0dffb76 Mon Sep 17 00:00:00 2001 +Message-Id: <69c64866ce072dea1d1e59a0d61e0f66c0dffb76.1513103764.git.jeremy@jcline.org> +From: Mohamed Ghannam <simo.ghannam@gmail.com> +Date: Tue, 5 Dec 2017 20:58:35 +0000 +Subject: [PATCH] dccp: CVE-2017-8824: use-after-free in DCCP code + +Whenever the sock object is in DCCP_CLOSED state, +dccp_disconnect() must free dccps_hc_tx_ccid and +dccps_hc_rx_ccid and set to NULL. + +Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com> +Reviewed-by: Eric Dumazet <edumazet@google.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + net/dccp/proto.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/net/dccp/proto.c b/net/dccp/proto.c +index b68168fcc06a..9d43c1f40274 100644 +--- a/net/dccp/proto.c ++++ b/net/dccp/proto.c +@@ -259,6 +259,7 @@ int dccp_disconnect(struct sock *sk, int flags) + { + struct inet_connection_sock *icsk = inet_csk(sk); + struct inet_sock *inet = inet_sk(sk); ++ struct dccp_sock *dp = dccp_sk(sk); + int err = 0; + const int old_state = sk->sk_state; + +@@ -278,6 +279,10 @@ int dccp_disconnect(struct sock *sk, int flags) + sk->sk_err = ECONNRESET; + + dccp_clear_xmit_timers(sk); ++ ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); ++ ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); ++ dp->dccps_hc_rx_ccid = NULL; ++ dp->dccps_hc_tx_ccid = NULL; + + __skb_queue_purge(&sk->sk_receive_queue); + __skb_queue_purge(&sk->sk_write_queue); +-- +2.14.3 + |