* [PATCH] tcp/dccp: CVE-2017-8824: use-after-free in DCCP code
@ 2017-12-04 20:27 simo.ghannam
2017-12-04 20:41 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: simo.ghannam @ 2017-12-04 20:27 UTC (permalink / raw)
To: netdev; +Cc: Mohamed Ghannam
From: Mohamed Ghannam <simo.ghannam@gmail.com>
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>
---
net/dccp/proto.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index b68168f..1814584 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;
@@ -279,6 +280,9 @@ int dccp_disconnect(struct sock *sk, int flags)
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 = dp->dccps_hc_tx_ccid = NULL;
__skb_queue_purge(&sk->sk_receive_queue);
__skb_queue_purge(&sk->sk_write_queue);
if (sk->sk_send_head != NULL) {
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tcp/dccp: CVE-2017-8824: use-after-free in DCCP code
2017-12-04 20:27 [PATCH] tcp/dccp: CVE-2017-8824: use-after-free in DCCP code simo.ghannam
@ 2017-12-04 20:41 ` Eric Dumazet
2017-12-04 20:48 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2017-12-04 20:41 UTC (permalink / raw)
To: simo.ghannam, netdev
On Mon, 2017-12-04 at 21:27 +0100, simo.ghannam@gmail.com wrote:
> From: Mohamed Ghannam <simo.ghannam@gmail.com>
>
> 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>
> ---
Small nit : white spaces in changelog where not needed :
Whenever the sock object is in DCCP_CLOSED state, dccp_disconnect()
must free dccps_hc_tx_ccid and dccps_hc_rx_ccid and set them to NULL.
Reviewed-by: Eric Dumazet <edumazet@google.com>
Thanks !
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tcp/dccp: CVE-2017-8824: use-after-free in DCCP code
2017-12-04 20:41 ` Eric Dumazet
@ 2017-12-04 20:48 ` Eric Dumazet
0 siblings, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2017-12-04 20:48 UTC (permalink / raw)
To: simo.ghannam, netdev
On Mon, 2017-12-04 at 12:41 -0800, Eric Dumazet wrote:
> On Mon, 2017-12-04 at 21:27 +0100, simo.ghannam@gmail.com wrote:
> > From: Mohamed Ghannam <simo.ghannam@gmail.com>
> >
> > 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>
> > ---
>
> Small nit : white spaces in changelog where not needed :
>
> Whenever the sock object is in DCCP_CLOSED state, dccp_disconnect()
> must free dccps_hc_tx_ccid and dccps_hc_rx_ccid and set them to NULL.
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
>
> Thanks !
>
Also patch title mentions tcp, but this is not a tcp fix, only dccp
[PATCH] dccp: CVE-2017-8824: use-after-free in DCCP code
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-04 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 20:27 [PATCH] tcp/dccp: CVE-2017-8824: use-after-free in DCCP code simo.ghannam
2017-12-04 20:41 ` Eric Dumazet
2017-12-04 20:48 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).