mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-21 06:01:34 +00:00
The current CLC proposal message construction uses a mix of
`ini->smc_type_v1/v2` and `pclc_base->hdr.typev1/v2` to decide whether
to include optional extensions (IPv6 prefix extension for v1, and v2
extension). This leads to a critical inconsistency: when
`smc_clc_prfx_set()` fails - for example, in IPv6-only environments with
only link-local addresses, or when the local IP address and the outgoing
interface’s network address are not in the same subnet.
As a result, the proposal message is assembled using the stale
`ini->smc_type_v1` value—causing the IPv6 prefix extension to be
included even though the header indicates v1 is not supported.
The peer then receives a malformed CLC proposal where the header type
does not match the payload, and immediately resets the connection.
The fix ensures consistency between the CLC header flags and the actual
payload by synchronizing `ini->smc_type_v1` with `pclc_base->hdr.typev1`
when prefix setup fails.
Fixes:
|
||
|---|---|---|
| .. | ||
| af_smc.c | ||
| Kconfig | ||
| Makefile | ||
| smc.h | ||
| smc_cdc.c | ||
| smc_cdc.h | ||
| smc_clc.c | ||
| smc_clc.h | ||
| smc_close.c | ||
| smc_close.h | ||
| smc_core.c | ||
| smc_core.h | ||
| smc_diag.c | ||
| smc_ib.c | ||
| smc_ib.h | ||
| smc_inet.c | ||
| smc_inet.h | ||
| smc_ism.c | ||
| smc_ism.h | ||
| smc_llc.c | ||
| smc_llc.h | ||
| smc_netlink.c | ||
| smc_netlink.h | ||
| smc_netns.h | ||
| smc_pnet.c | ||
| smc_pnet.h | ||
| smc_rx.c | ||
| smc_rx.h | ||
| smc_stats.c | ||
| smc_stats.h | ||
| smc_sysctl.c | ||
| smc_sysctl.h | ||
| smc_tracepoint.c | ||
| smc_tracepoint.h | ||
| smc_tx.c | ||
| smc_tx.h | ||
| smc_wr.c | ||
| smc_wr.h | ||