Commit 33700a0
net/tcp: Don't consider TCP_CLOSE in TCP_AO_ESTABLISHED
TCP_CLOSE may or may not have current/rnext keys and should not be
considered "established". The fast-path for TCP_CLOSE is
SKB_DROP_REASON_TCP_CLOSE. This is what tcp_rcv_state_process() does
anyways. Add an early drop path to not spend any time verifying
segment signatures for sockets in TCP_CLOSE state.
Cc: stable@vger.kernel.org # v6.7
Fixes: 0a3a809 ("net/tcp: Verify inbound TCP-AO signed segments")
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Link: https://lore.kernel.org/r/20240529-tcp_ao-sk_state-v1-1-d69b5d323c52@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent e85e271 commit 33700a0
2 files changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
204 | 206 | | |
205 | | - | |
206 | | - | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
| 936 | + | |
936 | 937 | | |
937 | 938 | | |
938 | 939 | | |
| |||
948 | 949 | | |
949 | 950 | | |
950 | 951 | | |
| 952 | + | |
951 | 953 | | |
952 | | - | |
| 954 | + | |
953 | 955 | | |
954 | 956 | | |
955 | 957 | | |
| |||
988 | 990 | | |
989 | 991 | | |
990 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
991 | 996 | | |
992 | 997 | | |
993 | 998 | | |
| |||
1001 | 1006 | | |
1002 | 1007 | | |
1003 | 1008 | | |
1004 | | - | |
| 1009 | + | |
1005 | 1010 | | |
1006 | 1011 | | |
1007 | 1012 | | |
| |||
1018 | 1023 | | |
1019 | 1024 | | |
1020 | 1025 | | |
1021 | | - | |
| 1026 | + | |
1022 | 1027 | | |
1023 | 1028 | | |
1024 | 1029 | | |
1025 | 1030 | | |
1026 | 1031 | | |
1027 | 1032 | | |
1028 | | - | |
| 1033 | + | |
1029 | 1034 | | |
1030 | 1035 | | |
1031 | 1036 | | |
| |||
0 commit comments