In the Linux kernel, the following vulnerability has been resolved:
kcm: Fix error handling for SOCKDGRAM in kcmsendmsg().
syzkaller found a memory leak in kcmsendmsg(), and commit c821a88bd720 ("kcm: Fix memory leak in error path of kcmsendmsg()") suppressed it by updating kcmtxmsg(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 kcmsendmsg() fails for SOCKDGRAM, we should purge the queue as we do so for UDP by udpflushpending_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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53825.json",
"cna_assigner": "Linux"
}