CVE-2024-35841: net: tls, fix WARNIING in __sk_msg_free

Published May 17, 2024
·
Updated

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

net: tls, fix WARNIING in skmsgfree

A splice with MSGSPLICEPAGES will cause tls code to use the tlsswsendmsgsplice path in the TLS sendmsg code to move the user provided pages from the msg into the msgpl. This will loop over the msg until msgpl is full, checked by skmsgfull(msgpl). The user can also set the MORE flag to hint stack to delay sending until receiving more pages and ideally a full buffer.

If the user adds more pages to the msg than can fit in the msgpl scatterlist (MAXMSGFRAGS) we should ignore the MORE flag and send the buffer anyways.

What actually happens though is we abort the msg to msgpl scatterlist setup and then because we forget to set 'full record' indicating we can no longer consume data without a send we fallthrough to the 'continue' path which will check if msgdataleft(msg) has more bytes to send and then attempts to fit them in the already full msgpl. Then next iteration of sender doing send will encounter a full msgpl and throw the warning in the syzbot report.

To fix simply check if we have a fullrecord in splice code path and if not send the msg regardless of MORE flag.

Affected Software

5 affected componentsFixes available
Linux Linux kernel>=6.5<6.6.14
Linux Linux kernel>=6.7<6.7.2
debian/linux<6.7.7-1
6.7.7-1
debian/linux<6.7.7-1
6.7.7-1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-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 6.7.7-1
  2. Upgrade

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

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1

Event History

May 17, 2024
CVE Published
via MITRE·02:27 PM
Data Sourced
via MITRE·02:27 PM
Description
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-35841?

CVE-2024-35841 is classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2024-35841?

To mitigate CVE-2024-35841, upgrade to the patched versions of the Linux kernel: 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.11-1, or 6.12.12-1.

3

What systems are affected by CVE-2024-35841?

CVE-2024-35841 affects specific versions of the Linux kernel in Debian-based distributions.

4

Is CVE-2024-35841 exploited in the wild?

There are currently no reported cases of exploitation for CVE-2024-35841 in the wild.

5

What components are impacted by CVE-2024-35841?

CVE-2024-35841 impacts the transport layer security (TLS) implementation within the Linux 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