Skip to content
Heist/ feed
Back to feed
UnratedFix available

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

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.326, 4.19.295, 5.10.195, 5.15.132, 5.4.257, 6.1.54, 6.5.4
CVEs
CVE-2023-53825
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 00:36 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 9 Dec 2025, 01:29 UTC

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.

osv:CVE-2023-53825

Kernel

Fixed versions: 4.14.326, 4.19.295, 5.4.257, 5.10.195, 5.15.132, 6.1.54, 6.5.4

Complete source record
{
  "id": "25e76a6a0653646ce66d5eb19ade69a4f122c1758f32b0e41fcad0427620305f",
  "url": "https://osv.dev/vulnerability/CVE-2023-53825",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().",
    "summary": "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.",
    "evidence": "osv:CVE-2023-53825",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.326",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.295",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.257",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.195",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.132",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.54",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.5.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2023-53825",
      "aliases": [
        "CVE-2023-53825"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ab7ac4eb9832e32a09f4e8042705484d2fb0aad3"
                },
                {
                  "fixed": "21b467735b0888a8daa048f83d3b9b50fdab71ce"
                },
                {
                  "fixed": "d4b8f380b0a041ee6a84fdac14127d8fe1dcad7b"
                },
                {
                  "fixed": "1ce8362b4ac6b8e65fd04a22ea37ec776ee1ec5b"
                },
                {
                  "fixed": "2e18493c421428a936946c452461b8e979088f17"
                },
                {
                  "fixed": "55d2e7c1ab8eaa7b62575b8a4194132795d1f9fc"
                },
                {
                  "fixed": "e5b28ce127a690f3acc49a6a342e6c9442c9edd6"
                },
                {
                  "fixed": "992b2ac783aad360b98ed9d4686e86176a20f6f1"
                },
                {
                  "fixed": "a22730b1b4bf437c6bbfdeff5feddf54be4aeada"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53825.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.6.0"
                },
                {
                  "fixed": "4.14.326"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.295"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.257"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.195"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.132"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.54"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.5.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53825.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.300361023Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/1ce8362b4ac6b8e65fd04a22ea37ec776ee1ec5b",
        "https://git.kernel.org/stable/c/21b467735b0888a8daa048f83d3b9b50fdab71ce",
        "https://git.kernel.org/stable/c/2e18493c421428a936946c452461b8e979088f17",
        "https://git.kernel.org/stable/c/55d2e7c1ab8eaa7b62575b8a4194132795d1f9fc",
        "https://git.kernel.org/stable/c/992b2ac783aad360b98ed9d4686e86176a20f6f1",
        "https://git.kernel.org/stable/c/a22730b1b4bf437c6bbfdeff5feddf54be4aeada",
        "https://git.kernel.org/stable/c/d4b8f380b0a041ee6a84fdac14127d8fe1dcad7b",
        "https://git.kernel.org/stable/c/e5b28ce127a690f3acc49a6a342e6c9442c9edd6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53825.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-53825",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53825.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-53825",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 521017,
  "published_at": "2025-12-09T01:29:38.539+00:00"
}