CVE-2023-53825

kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().

No CVSS score yet EPSS 0.27%

Published 9 Dec 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2023-53825

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-53825 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 21.3% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before 21b467735b0888a8daa048f83d3b9b50fdab71ce
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before d4b8f380b0a041ee6a84fdac14127d8fe1dcad7b
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before 1ce8362b4ac6b8e65fd04a22ea37ec776ee1ec5b
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before 2e18493c421428a936946c452461b8e979088f17
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before 55d2e7c1ab8eaa7b62575b8a4194132795d1f9fc
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before e5b28ce127a690f3acc49a6a342e6c9442c9edd6
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before 992b2ac783aad360b98ed9d4686e86176a20f6f1
affected from ab7ac4eb9832e32a09f4e8042705484d2fb0aad3, before a22730b1b4bf437c6bbfdeff5feddf54be4aeada
Other versions: unaffected
Linux
affected 4.6
unaffected before 4.6
unaffected from 4.14.326 up to and including 4.14.*
unaffected from 4.19.295 up to and including 4.19.*
unaffected from 5.4.257 up to and including 5.4.*
unaffected from 5.10.195 up to and including 5.10.*
unaffected from 5.15.132 up to and including 5.15.*
unaffected from 6.1.54 up to and including 6.1.*
unaffected from 6.5.4 up to and including 6.5.*
unaffected 6.6 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-53825 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-53825

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-53825
trivy image --scanners vuln IMAGE | grep CVE-2023-53825

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2023-53825 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.