CVE-2024-50142: xfrm: validate new SA's prefixlen using SA family when sel.family is unset

Published Nov 7, 2024
·
Updated

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

xfrm: validate new SA's prefixlen using SA family when sel.family is unset

This expands the validation introduced in commit 07bf7908950a ("xfrm: Validate address prefix lengths in the xfrm selector.")

syzbot created an SA with usersa.sel.family = AFUNSPEC usersa.sel.prefixlens = 128 usersa.family = AFINET

Because of the AFUNSPEC selector, verifynewsainfo doesn't put limits on prefixlen{s,d}. But then copyfromuserstate sets x->sel.family to usersa.family (AFINET). Do the same conversion in verifynewsainfo before validating prefixlen{s,d}, since that's how prefixlen is going to be used later on.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

17 affected componentsFixes available
Linux Linux kernel>=2.6.12<4.19.323
Linux Linux kernel>=4.20<5.4.285
Linux Linux kernel>=5.5<5.10.229
Linux Linux kernel>=5.11<5.15.170
Linux Linux kernel>=5.16<6.1.115
Linux Linux kernel>=6.2<6.6.59
Linux Linux kernel>=6.7<6.11.6
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
Linux Linux kernel=6.12-rc4
debian/linux<=5.10.223-1
5.10.251-56.1.170-36.1.172-16.12.86-16.12.88-17.0.7-1
debian/linux-6.1
6.1.172-1~deb11u1
Microsoft cbl2 kernel 5.15.167.1-2<5.15.173.1-1
5.15.173.1-1
Microsoft azl3 kernel 6.6.64.2-1<6.6.64.2-1
6.6.64.2-1
Microsoft cbl2 kernel 5.15.173.1-1<5.15.173.1-1
5.15.173.1-1
Microsoft azl3 kernel 6.6.57.1-7<6.6.64.2-1
6.6.64.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.251-5Fixed in 6.1.170-3Fixed in 6.1.172-1Fixed in 6.12.86-1Fixed in 6.12.88-1Fixed in 7.0.7-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.172-1~deb11u1
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 5.15.173.1-1
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.64.2-1
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch commit 07bf7908950a (
  6. Configuration

    In verify_newsa_info, before validating prefixlen_{s,d}, perform the same conversion so x->sel.family is set from usersa.family (e.g., AF_INET) when sel.family is unset (AF_UNSPEC), and then validate prefixlen_{s,d} using the resulting SA family.

    Linux kernel xfrm (validate new SA prefixlen using SA family when sel.family is unset) AF_UNSPEC selector handling in verify_newsa_info = Use usersa.family to validate prefixlen_{s,d} when sel.family is unset (AF_UNSPEC)

Event History

Nov 7, 2024
CVE Published
via MITRE·09:31 AM
Data Sourced
via MITRE·09:31 AM
Description
Data Sourced
via Red Hat·10:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·10:15 AM
RemedyDescriptionSeverityAffected Software
Dec 12, 2024
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
SeverityAffected Software
Updated
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
Description
Feb 20, 2025
Data Sourced
via Launchpad·12:49 AM
Description
May 19, 2026
Data Sourced
via Debian·04:11 AM
DescriptionAffected Software
May 20, 2026
Data Sourced
via Ubuntu·04:11 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-50142?

CVE-2024-50142 has a moderate severity rating due to its potential impact on the Linux kernel's security mechanism.

2

How do I fix CVE-2024-50142?

To fix CVE-2024-50142, update the Linux kernel to version 6.1.123-1 or higher.

3

Which versions of the Linux kernel are affected by CVE-2024-50142?

CVE-2024-50142 affects multiple versions of the Linux kernel, including versions between 2.6.12 and 6.12-rc4.

4

Are there any specific distributions that need to patch CVE-2024-50142?

Yes, Debian distributions need to apply the patch for CVE-2024-50142 in related Linux kernel packages.

5

What is the nature of the vulnerability described in CVE-2024-50142?

CVE-2024-50142 pertains to improper validation of the new Security Association's prefix length in the Linux kernel's xfrm module.

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