CVE-2024-35841

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
17/05/2024
Last modified:
26/09/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: tls, fix WARNIING in __sk_msg_free<br /> <br /> A splice with MSG_SPLICE_PAGES will cause tls code to use the<br /> tls_sw_sendmsg_splice path in the TLS sendmsg code to move the user<br /> provided pages from the msg into the msg_pl. This will loop over the<br /> msg until msg_pl is full, checked by sk_msg_full(msg_pl). The user<br /> can also set the MORE flag to hint stack to delay sending until receiving<br /> more pages and ideally a full buffer.<br /> <br /> If the user adds more pages to the msg than can fit in the msg_pl<br /> scatterlist (MAX_MSG_FRAGS) we should ignore the MORE flag and send<br /> the buffer anyways.<br /> <br /> What actually happens though is we abort the msg to msg_pl scatterlist<br /> setup and then because we forget to set &amp;#39;full record&amp;#39; indicating we<br /> can no longer consume data without a send we fallthrough to the &amp;#39;continue&amp;#39;<br /> path which will check if msg_data_left(msg) has more bytes to send and<br /> then attempts to fit them in the already full msg_pl. Then next<br /> iteration of sender doing send will encounter a full msg_pl and throw<br /> the warning in the syzbot report.<br /> <br /> To fix simply check if we have a full_record in splice code path and<br /> if not send the msg regardless of MORE flag.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.5 (including) 6.6.14 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.7.2 (excluding)