Description
In the Linux kernel, the following vulnerability has been resolved: sctp: fix race between sctp_wait_for_connect and peeloff sctp_wait_for_connect() drops and re-acquires the socket lock while waiting for the association to reach ESTABLISHED state. During this window, another thread can peeloff the association to a new socket via getsockopt(SCTP_SOCKOPT_PEELOFF), changing asoc->base.sk. After re-acquiring the old socket lock, sctp_wait_for_connect() returns success without noticing the migration — the caller then accesses the association under the wrong lock in sctp_datamsg_from_user(). Add the same sk != asoc->base.sk check that sctp_wait_for_sndbuf() already has, returning an error if the association was migrated while we slept.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
668c9beb9020d5834ee9e43c208190a07d2b1928 to < 0e0d5bc76fd4267a71334fcc8f1a5fbcf997845daffected668c9beb9020d5834ee9e43c208190a07d2b1928 to < bcfeac79af740735ace44008b4a11b8e5add20f5affected668c9beb9020d5834ee9e43c208190a07d2b1928 to < 8e9b56051d24540cfbf39194618708c4a7633549affected668c9beb9020d5834ee9e43c208190a07d2b1928 to < 634a9af8a26a84d8b0d7b3b643204b344b42d9fbaffected668c9beb9020d5834ee9e43c208190a07d2b1928 to < 7d2038d4b80166f7bead8d07eba3b97405816c21affected668c9beb9020d5834ee9e43c208190a07d2b1928 to < 68667ee4c7dadf7f63167234e2a1af09b3f7874eaffected668c9beb9020d5834ee9e43c208190a07d2b1928 to < 6140cfa721451fa6e18e134e709703c2bf34d0fbaffected668c9beb9020d5834ee9e43c208190a07d2b1928 to < f14fe6395a8b3d961a61e138ad7b36ba3626dd4eaffected
Linux Linux
Default version status: affected
4.16affected0 to < 4.16unaffected5.10.259 to ≤ 5.10.*unaffected5.15.210 to ≤ 5.15.*unaffected6.1.176 to ≤ 6.1.*unaffected6.6.143 to ≤ 6.6.*unaffected6.12.93 to ≤ 6.12.*unaffected6.18.35 to ≤ 6.18.*unaffected7.0.12 to ≤ 7.0.*unaffected7.1 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/0e0d5bc76fd4267a71334fcc8f1a5fbcf997845d ↗
- https://git.kernel.org/stable/c/bcfeac79af740735ace44008b4a11b8e5add20f5 ↗
- https://git.kernel.org/stable/c/8e9b56051d24540cfbf39194618708c4a7633549 ↗
- https://git.kernel.org/stable/c/634a9af8a26a84d8b0d7b3b643204b344b42d9fb ↗
- https://git.kernel.org/stable/c/7d2038d4b80166f7bead8d07eba3b97405816c21 ↗
- https://git.kernel.org/stable/c/68667ee4c7dadf7f63167234e2a1af09b3f7874e ↗
- https://git.kernel.org/stable/c/6140cfa721451fa6e18e134e709703c2bf34d0fb ↗
- https://git.kernel.org/stable/c/f14fe6395a8b3d961a61e138ad7b36ba3626dd4e ↗