{"id":"CVE-2021-46999","aliases":["CVE-2021-46999"],"related":[],"kind":"vulnerability","state":"published","title":"sctp: do asoc update earlier in sctp_sf_do_dupcook_a","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsctp: do asoc update earlier in sctp_sf_do_dupcook_a\n\nThere's a panic that occurs in a few of envs, the call trace is as below:\n\n  [] general protection fault, ... 0x29acd70f1000a: 0000 [#1] SMP PTI\n  [] RIP: 0010:sctp_ulpevent_notify_peer_addr_change+0x4b/0x1fa [sctp]\n  []  sctp_assoc_control_transport+0x1b9/0x210 [sctp]\n  []  sctp_do_8_2_transport_strike.isra.16+0x15c/0x220 [sctp]\n  []  sctp_cmd_interpreter.isra.21+0x1231/0x1a10 [sctp]\n  []  sctp_do_sm+0xc3/0x2a0 [sctp]\n  []  sctp_generate_timeout_event+0x81/0xf0 [sctp]\n\nThis is caused by a transport use-after-free issue. When processing a\nduplicate COOKIE-ECHO chunk in sctp_sf_do_dupcook_a(), both COOKIE-ACK\nand SHUTDOWN chunks are allocated with the transort from the new asoc.\nHowever, later in the sideeffect machine, the old asoc is used to send\nthem out and old asoc's shutdown_last_sent_to is set to the transport\nthat SHUTDOWN chunk attached to in sctp_cmd_setup_t2(), which actually\nbelongs to the new asoc. After the new_asoc is freed and the old asoc\nT2 timeout, the old asoc's shutdown_last_sent_to that is already freed\nwould be accessed in sctp_sf_t2_timer_expire().\n\nThanks Alexander and Jere for helping dig into this issue.\n\nTo fix it, this patch is to do the asoc update first, then allocate\nthe COOKIE-ACK and SHUTDOWN chunks with the 'updated' old asoc. This\nwould make more sense, as a chunk from an asoc shouldn't be sent out\nwith another asoc. We had fixed quite a few issues caused by this.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsctp: do asoc update earlier in sctp_sf_do_dupcook_a\n\nThere's a panic that occurs in a few of envs, the call trace is as below:\n\n  [] general protection fault, ... 0x29acd70f1000a: 0000 [#1] SMP PTI\n  [] RIP: 0010:sctp_ulpevent_notify_peer_addr_change+0x4b/0x1fa [sctp]\n  []  sctp_assoc_control_transport+0x1b9/0x210 [sctp]\n  []  sctp_do_8_2_transport_strike.isra.16+0x15c/0x220 [sctp]\n  []  sctp_cmd_interpreter.isra.21+0x1231/0x1a10 [sctp]\n  []  sctp_do_sm+0xc3/0x2a0 [sctp]\n  []  sctp_generate_timeout_event+0x81/0xf0 [sctp]\n\nThis is caused by a transport use-after-free issue. When processing a\nduplicate COOKIE-ECHO chunk in sctp_sf_do_dupcook_a(), both COOKIE-ACK\nand SHUTDOWN chunks are allocated with the transort from the new asoc.\nHowever, later in the sideeffect machine, the old asoc is used to send\nthem out and old asoc's shutdown_last_sent_to is set to the transport\nthat SHUTDOWN chunk attached to in sctp_cmd_setup_t2(), which actually\nbelongs to the new asoc. After the new_asoc is freed and the old asoc\nT2 timeout, the old asoc's shutdown_last_sent_to that is already freed\nwould be accessed in sctp_sf_t2_timer_expire().\n\nThanks Alexander and Jere for helping dig into this issue.\n\nTo fix it, this patch is to do the asoc update first, then allocate\nthe COOKIE-ACK and SHUTDOWN chunks with the 'updated' old asoc. This\nwould make more sense, as a chunk from an asoc shouldn't be sent out\nwith another asoc. We had fixed quite a few issues caused by this.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: sctp: haga una actualización anterior en sctp_sf_do_dupcook_a Hay un pánico que ocurre en algunos de los entornos, el seguimiento de la llamada es el siguiente: [] falla de protección general, ... 0x29acd70f1000a: 0000 [#1] SMP PTI [] RIP: 0010:sctp_ulpevent_notify_peer_addr_change+0x4b/0x1fa [sctp] [] sctp_assoc_control_transport+0x1b9/0x210 [sctp] [] sctp_do_8_2_transport_strike.isra.16+0x15c/0x220 [sctp] [] sctp_cmd_interpreter.isra. 21+0x1231/0x1a10 [sctp] [] sctp_do_sm+0xc3/0x2a0 [sctp] [] sctp_generate_timeout_event+0x81/0xf0 [sctp] Esto se debe a un problema de use-after-free del transporte. Al procesar un fragmento COOKIE-ECHO duplicado en sctp_sf_do_dupcook_a(), tanto los fragmentos COOKIE-ACK como SHUTDOWN se asignan con el transort del nuevo asoc. Sin embargo, más adelante en la máquina de efectos secundarios, el antiguo asoc se utiliza para enviarlos y el Shutdown_last_sent_to del antiguo asoc se configura en el transporte al que se adjuntó el fragmento SHUTDOWN en sctp_cmd_setup_t2(), que en realidad pertenece al nuevo asoc. Después de que se libera el new_asoc y se agota el tiempo de espera T2 del antiguo asoc, se accederá al Shutdown_last_sent_to del antiguo asoc que ya está liberado en sctp_sf_t2_timer_expire(). Gracias Alexander y Jere por ayudarnos a profundizar en este problema. Para solucionarlo, este parche consiste en realizar primero la actualización de asoc y luego asignar los fragmentos COOKIE-ACK y SHUTDOWN con el antiguo asoc 'actualizado'. Esto tendría más sentido, ya que un fragmento de una asoc no debería enviarse con otra asoc. Hemos solucionado bastantes problemas causados por esto.","source":"nvd"}],"published":"2024-02-28T08:13:22.256Z","modified":"2026-08-05T08:45:28.974Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"db8bf823e70f239372c62f13e4eb6f08a1665e8c","fixed":"d624f2991b977821375fbd56c91b0c91d456a697","status":"affected"},{"type":"git","introduced":"a204d577be70e0a0a6023cf1b9859c9ebffaeecd","fixed":"b1b31948c0af44628e43353828453461bb74098f","status":"affected"},{"type":"git","introduced":"145cb2f7177d94bc54563ed26027e952ee0ae03c","fixed":"f01988ecf3654f805282dce2d3bb9afe68d2691e","status":"affected"},{"type":"git","introduced":"145cb2f7177d94bc54563ed26027e952ee0ae03c","fixed":"61b877bad9bb0d82b7d8841be50872557090a704","status":"affected"},{"type":"git","introduced":"145cb2f7177d94bc54563ed26027e952ee0ae03c","fixed":"0bfd913c2121b3d553bfd52810fe6061d542d625","status":"affected"},{"type":"git","introduced":"145cb2f7177d94bc54563ed26027e952ee0ae03c","fixed":"35b4f24415c854cd718ccdf38dbea6297f010aae","status":"affected"},{"type":"git","version":"a5ce8531ea508d270822b2bc6140c6198c8a2a7b","status":"affected"},{"type":"semver","introduced":"4.19.123","fixed":"4.19.191","status":"affected"},{"type":"semver","introduced":"5.4.41","fixed":"5.4.120","status":"affected"},{"type":"semver","introduced":"5.6.13","fixed":"5.7","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.7","status":"unaffected"},{"type":"semver","introduced":"4.19.191","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.120","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.38","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.11.22","lastAffected":"5.11.*","status":"unaffected"},{"type":"semver","introduced":"5.12.5","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19.123","fixed":"4.19.191"},{"status":"affected","introduced":"5.4.41","fixed":"5.4.120"},{"status":"affected","introduced":"5.7","fixed":"5.10.38"},{"status":"affected","introduced":"5.11","fixed":"5.11.22"},{"status":"affected","introduced":"5.12","fixed":"5.12.5"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d624f2991b977821375fbd56c91b0c91d456a697","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b1b31948c0af44628e43353828453461bb74098f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f01988ecf3654f805282dce2d3bb9afe68d2691e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/61b877bad9bb0d82b7d8841be50872557090a704","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0bfd913c2121b3d553bfd52810fe6061d542d625","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/35b4f24415c854cd718ccdf38dbea6297f010aae","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-21T16:28:23.491Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46999","url":"https://www.cve.org/CVERecord?id=CVE-2021-46999","licence":"CVE Terms of Use","modified":"2026-08-05T08:45:28.974Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46999","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46999","licence":"Public domain","modified":"2026-08-04T10:16:40.750Z"}],"updatedAt":"2026-11-25T22:58:08.609Z","epss":{"score":0.00743,"percentile":0.55918,"date":"2026-12-01T12:00:22.000Z"}}