CVE-2021-46999: sctp: do asoc update earlier in sctp_sf_do_dupcook_a

Published Feb 28, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

sctp: do asoc update earlier in sctpsfdodupcooka

There's a panic that occurs in a few of envs, the call trace is as below:

[] general protection fault, ... 0x29acd70f1000a: 0000 [#1] SMP PTI [] RIP: 0010:sctpulpeventnotifypeeraddrchange+0x4b/0x1fa [sctp] [] sctpassoccontroltransport+0x1b9/0x210 [sctp] [] sctpdo82transportstrike.isra.16+0x15c/0x220 [sctp] [] sctpcmdinterpreter.isra.21+0x1231/0x1a10 [sctp] [] sctpdosm+0xc3/0x2a0 [sctp] [] sctpgeneratetimeoutevent+0x81/0xf0 [sctp]

This is caused by a transport use-after-free issue. When processing a duplicate COOKIE-ECHO chunk in sctpsfdodupcooka(), both COOKIE-ACK and SHUTDOWN chunks are allocated with the transort from the new asoc. However, later in the sideeffect machine, the old asoc is used to send them out and old asoc's shutdownlastsentto is set to the transport that SHUTDOWN chunk attached to in sctpcmdsetupt2(), which actually belongs to the new asoc. After the newasoc is freed and the old asoc T2 timeout, the old asoc's shutdownlastsentto that is already freed would be accessed in sctpsft2timerexpire().

Thanks Alexander and Jere for helping dig into this issue.

To fix it, this patch is to do the asoc update first, then allocate the COOKIE-ACK and SHUTDOWN chunks with the 'updated' old asoc. This would make more sense, as a chunk from an asoc shouldn't be sent out with another asoc. We had fixed quite a few issues caused by this.

Affected Software

5 affected components
Linux Linux kernel>=4.19.123<4.19.191
Linux Linux kernel>=5.4.41<5.4.120
Linux Linux kernel>=5.7<5.10.38
Linux Linux kernel>=5.11<5.11.22
Linux Linux kernel>=5.12<5.12.5

Event History

Feb 28, 2024
CVE Published
via MITRE·08:13 AM
Data Sourced
via MITRE·08:13 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-46999?

CVE-2021-46999 is classified with high severity due to its potential to cause kernel panic in affected systems.

2

How do I fix CVE-2021-46999?

To fix CVE-2021-46999, update your Linux kernel to a version that is above the affected thresholds as specified by the vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2021-46999?

CVE-2021-46999 affects Linux kernel versions 4.19.123 to 4.19.191, 5.4.41 to 5.4.120, 5.7 to 5.10.38, and 5.11 to 5.11.22.

4

What symptoms indicate an issue related to CVE-2021-46999?

Symptoms of CVE-2021-46999 may include unexpected system crashes or kernel panics while using affected Linux kernel versions.

5

Is there any workaround for CVE-2021-46999?

There are no specific workarounds for CVE-2021-46999; the best approach is to apply the patch by upgrading the kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203