Skip to content

Commit

Permalink
kernel: fix reuse-after-free in DCCP (backport from 5edabca9d4cff7f1f…
Browse files Browse the repository at this point in the history
…2b68f0bac55ef99d9798ba4)

Note that this does not currently affect us, as DCCP support isn't enabled.  This fix is
applied in case DCCP was enabled at some point in the future.
  • Loading branch information
RMerl committed Feb 23, 2017
1 parent 9e665fc commit cced648
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion release/src-rt-6.x.4708/linux/linux-2.6.36/net/dccp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
skb) < 0)
return 1;
goto discard;
consume_skb(skb);
return 0;
}
if (dh->dccph_type == DCCP_PKT_RESET)
goto discard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
skb) < 0)
return 1;
goto discard;
consume_skb(skb);
return 0;
}
if (dh->dccph_type == DCCP_PKT_RESET)
goto discard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
skb) < 0)
return 1;
goto discard;
consume_skb(skb);
return 0;
}
if (dh->dccph_type == DCCP_PKT_RESET)
goto discard;
Expand Down
5 changes: 2 additions & 3 deletions release/src-rt/linux/linux-2.6/net/dccp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
skb) < 0)
return 1;

/* FIXME: do congestion control initialization */
goto discard;
consume_skb(skb);
return 0;
}
if (dh->dccph_type == DCCP_PKT_RESET)
goto discard;
Expand Down

0 comments on commit cced648

Please sign in to comment.