Commit 6613b617 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: conntrack: dccp: treat SYNC/SYNCACK as invalid if no prior state

When first DCCP packet is SYNC or SYNCACK, we insert a new conntrack
that has an un-initialized timeout value, i.e. such entry could be
reaped at any time.

Mark them as INVALID and only ignore SYNC/SYNCACK when connection had
an old state.

Reported-by: syzbot+6f18401420df260e37ed@syzkaller.appspotmail.com
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c6cc94df
...@@ -243,14 +243,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] = ...@@ -243,14 +243,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] =
* We currently ignore Sync packets * We currently ignore Sync packets
* *
* sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */ * sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
}, },
[DCCP_PKT_SYNCACK] = { [DCCP_PKT_SYNCACK] = {
/* /*
* We currently ignore SyncAck packets * We currently ignore SyncAck packets
* *
* sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */ * sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
}, },
}, },
[CT_DCCP_ROLE_SERVER] = { [CT_DCCP_ROLE_SERVER] = {
...@@ -371,14 +371,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] = ...@@ -371,14 +371,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] =
* We currently ignore Sync packets * We currently ignore Sync packets
* *
* sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */ * sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
}, },
[DCCP_PKT_SYNCACK] = { [DCCP_PKT_SYNCACK] = {
/* /*
* We currently ignore SyncAck packets * We currently ignore SyncAck packets
* *
* sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */ * sNO, sRQ, sRS, sPO, sOP, sCR, sCG, sTW */
sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIG, sIV, sIG, sIG, sIG, sIG, sIG, sIG, sIG,
}, },
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment