Commit ca1cfa59 authored by Florian Westphal's avatar Florian Westphal Committed by Kleber Sacilotto de Souza

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

BugLink: https://bugs.launchpad.net/bugs/1792377

commit 6613b617 upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 2b30392a
...@@ -244,14 +244,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] = ...@@ -244,14 +244,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] = {
...@@ -372,14 +372,14 @@ dccp_state_table[CT_DCCP_ROLE_MAX + 1][DCCP_PKT_SYNCACK + 1][CT_DCCP_MAX + 1] = ...@@ -372,14 +372,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