mirror of https://github.com/torvalds/linux.git
Because of the size restriction in the TCP options space, the MPTCP
ADD_ADDR option is exclusive and cannot be sent with other MPTCP ones.
For this reason, in the linked mptcp_out_options structure, group of
fields linked to different options are part of the same union.
There is a case where the mptcp_pm_add_addr_signal() function can modify
opts->addr, but not ended up sending an ADD_ADDR. Later on, back in
mptcp_established_options, other options will be sent, but with
unexpected data written in other fields due to the union, e.g. in
opts->ext_copy. This could lead to a data stream corruption in the next
packet.
Using an intermediate variable, prevents from corrupting previously
established DSS option. The assignment of the ADD_ADDR option
parameters is now done once we are sure this ADD_ADDR option can be set
in the packet, e.g. after having dropped other suboptions.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| bpf.c | ||
| crypto.c | ||
| crypto_test.c | ||
| ctrl.c | ||
| diag.c | ||
| fastopen.c | ||
| mib.c | ||
| mib.h | ||
| mptcp_diag.c | ||
| mptcp_pm_gen.c | ||
| mptcp_pm_gen.h | ||
| options.c | ||
| pm.c | ||
| pm_netlink.c | ||
| pm_userspace.c | ||
| protocol.c | ||
| protocol.h | ||
| sched.c | ||
| sockopt.c | ||
| subflow.c | ||
| syncookies.c | ||
| token.c | ||
| token_test.c | ||