CVE-2023-53825

Linux Kernel - Memory Leak in kcm_sendmsg() Error Handling

Title source: llm
STIX 2.1

Description

In the Linux kernel, the following vulnerability has been resolved: kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg(). syzkaller found a memory leak in kcm_sendmsg(), and commit c821a88bd720 ("kcm: Fix memory leak in error path of kcm_sendmsg()") suppressed it by updating kcm_tx_msg(head)->last_skb if partial data is copied so that the following sendmsg() will resume from the skb. However, we cannot know how many bytes were copied when we get the error. Thus, we could mess up the MSG_MORE queue. When kcm_sendmsg() fails for SOCK_DGRAM, we should purge the queue as we do so for UDP by udp_flush_pending_frames(). Even without this change, when the error occurred, the following sendmsg() resumed from a wrong skb and the queue was messed up. However, we have yet to get such a report, and only syzkaller stumbled on it. So, this can be changed safely. Note this does not change SOCK_SEQPACKET behaviour.

Scores

EPSS 0.0023
EPSS Percentile 13.9%

Details

Status published
Products (25)
linux/Kernel 4.15.0 - 4.19.295linux
linux/Kernel 4.20.0 - 5.4.257linux
linux/Kernel 4.6.0 - 4.14.326linux
linux/Kernel 5.11.0 - 5.15.132linux
linux/Kernel 5.16.0 - 6.1.54linux
linux/Kernel 5.5.0 - 5.10.195linux
linux/Kernel 6.2.0 - 6.5.4linux
Linux/Linux < 4.6
Linux/Linux 4.14.326 - 4.14.*
Linux/Linux 4.19.295 - 4.19.*
... and 15 more
Published Dec 09, 2025
Tracked Since Feb 18, 2026