# CVE-2023-53825: kcm: Fix error handling for SOCK\_DGRAM in kcm\_sendmsg().

- Priority: **Routine**
- Reason: Not severe (CVSS 6.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-12-09 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2023-53825, DEBIAN-CVE-2023-53825
- Record: https://cvemate.com/vulnerability/CVE-2023-53825 · JSON: https://cvemate.com/vulnerability/CVE-2023-53825/json

## Description

```text
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.
```

## Signals

- CVSS: 6.8 medium (v4.0, OSV · Ubuntu) CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- EPSS: 0.275%, percentile 21.295%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 126)

- debian linux (Debian): \< 6.1.55-1 \| \< 6.5.6-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-169.187 \| \< 5.15.0-94.104
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1116.126 \| \< 5.15.0-1053.58
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1053.58~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1116.126~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1116.126+fips1 \| \< 5.15.0-1053.58+fips1
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1121.128 \| \< 5.15.0-1056.64
- ubuntu linux-azure-4.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/21b467735b0888a8daa048f83d3b9b50fdab71ce>
- <https://git.kernel.org/stable/c/d4b8f380b0a041ee6a84fdac14127d8fe1dcad7b>
- <https://git.kernel.org/stable/c/1ce8362b4ac6b8e65fd04a22ea37ec776ee1ec5b>
- <https://git.kernel.org/stable/c/2e18493c421428a936946c452461b8e979088f17>
- <https://git.kernel.org/stable/c/55d2e7c1ab8eaa7b62575b8a4194132795d1f9fc>
- <https://git.kernel.org/stable/c/e5b28ce127a690f3acc49a6a342e6c9442c9edd6>
- <https://git.kernel.org/stable/c/992b2ac783aad360b98ed9d4686e86176a20f6f1>
- <https://git.kernel.org/stable/c/a22730b1b4bf437c6bbfdeff5feddf54be4aeada>
- <https://ubuntu.com/security/CVE-2023-53825>
- <https://www.cve.org/CVERecord?id=CVE-2023-53825>
- <https://git.kernel.org/linus/a22730b1b4bf437c6bbfdeff5feddf54be4aeada>
- <https://security-tracker.debian.org/tracker/CVE-2023-53825>

---

Data as of 2026-12-06T04:33:07.081Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
