Skip to content
Heist/ feed
Back to feed
HighFix available

kcm: Serialise kcm_sendmsg() for the same socket.

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: kcm: Serialise kcm_sendmsg() for the same socket. syzkaller reported UAF in kcm_release(). [0] The scenario is 1. Thread A builds a skb with MSG_MORE and sets kcm->seq_skb. 2. Thread A resumes building skb from kcm->seq_skb but is blocked by sk_stream_wait_memory() 3. Thread B calls sendmsg() concurrently, finishes building kcm->seq_skb and puts the skb to the write queue 4. Thread A faces an error and finally frees skb that is already in the write queue 5. kcm_release() does double-free the skb in the write queue When a thread is building a MSG_MORE skb, another thread must not touch it. Let's add a per-sk mutex and serialise kcm_sendmsg(). [0]: BUG: KASAN: slab-use-after-free in __skb_unlink include/linux/skbuff.h:2366 [inline] BUG: KASAN: slab-use-after-free in __skb_dequeue include/linux/skbuff.h:2385 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge_reason include/linux/skbuff.h:3175 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge include/linux/skbuff.h:3181 [inline] BUG: KASAN: slab-use-after-free in kcm_release+0x170/0x4c8 net/kcm/kcmsock.c:1691 Read of size 8 at addr ffff0000ced0fc80 by task syz-executor329/6167 CPU: 1 PID: 6167 Comm: syz-executor329 Tainted: G B 6.8.0-rc5-syzkaller-g9abbc24128bc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.321, 5.10.225, 5.15.166, 5.4.283, 6.1.107, 6.10.7, 6.6.48
CVEs
CVE-2024-44946
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:33 UTC · Revision 1

Source evidence

kcm: Serialise kcm_sendmsg() for the same socket.

core-osv · Original source

Published 31 Aug 2024, 13:22 UTC

In the Linux kernel, the following vulnerability has been resolved: kcm: Serialise kcm_sendmsg() for the same socket. syzkaller reported UAF in kcm_release(). [0] The scenario is 1. Thread A builds a skb with MSG_MORE and sets kcm->seq_skb. 2. Thread A resumes building skb from kcm->seq_skb but is blocked by sk_stream_wait_memory() 3. Thread B calls sendmsg() concurrently, finishes building kcm->seq_skb and puts the skb to the write queue 4. Thread A faces an error and finally frees skb that is already in the write queue 5. kcm_release() does double-free the skb in the write queue When a thread is building a MSG_MORE skb, another thread must not touch it. Let's add a per-sk mutex and serialise kcm_sendmsg(). [0]: BUG: KASAN: slab-use-after-free in __skb_unlink include/linux/skbuff.h:2366 [inline] BUG: KASAN: slab-use-after-free in __skb_dequeue include/linux/skbuff.h:2385 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge_reason include/linux/skbuff.h:3175 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge include/linux/skbuff.h:3181 [inline] BUG: KASAN: slab-use-after-free in kcm_release+0x170/0x4c8 net/kcm/kcmsock.c:1691 Read of size 8 at addr ffff0000ced0fc80 by task syz-executor329/6167 CPU: 1 PID: 6167 Comm: syz-executor329 Tainted: G B 6.8.0-rc5-syzkaller-g9abbc24128bc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c

osv:CVE-2024-44946

Kernel

Fixed versions: 4.19.321, 5.4.283, 5.10.225, 5.15.166, 6.1.107, 6.6.48, 6.10.7

Complete source record
{
  "id": "6a57a0d9fcd63a576e153b6477d2b041aaa9cf3e2f2033ae7441bce7423a93b7",
  "url": "https://osv.dev/vulnerability/CVE-2024-44946",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "kcm: Serialise kcm_sendmsg() for the same socket.",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: kcm: Serialise kcm_sendmsg() for the same socket. syzkaller reported UAF in kcm_release(). [0] The scenario is 1. Thread A builds a skb with MSG_MORE and sets kcm->seq_skb. 2. Thread A resumes building skb from kcm->seq_skb but is blocked by sk_stream_wait_memory() 3. Thread B calls sendmsg() concurrently, finishes building kcm->seq_skb and puts the skb to the write queue 4. Thread A faces an error and finally frees skb that is already in the write queue 5. kcm_release() does double-free the skb in the write queue When a thread is building a MSG_MORE skb, another thread must not touch it. Let's add a per-sk mutex and serialise kcm_sendmsg(). [0]: BUG: KASAN: slab-use-after-free in __skb_unlink include/linux/skbuff.h:2366 [inline] BUG: KASAN: slab-use-after-free in __skb_dequeue include/linux/skbuff.h:2385 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge_reason include/linux/skbuff.h:3175 [inline] BUG: KASAN: slab-use-after-free in __skb_queue_purge include/linux/skbuff.h:3181 [inline] BUG: KASAN: slab-use-after-free in kcm_release+0x170/0x4c8 net/kcm/kcmsock.c:1691 Read of size 8 at addr ffff0000ced0fc80 by task syz-executor329/6167 CPU: 1 PID: 6167 Comm: syz-executor329 Tainted: G B 6.8.0-rc5-syzkaller-g9abbc24128bc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c",
    "evidence": "osv:CVE-2024-44946",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.321",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.283",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.225",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.166",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.107",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.48",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.10.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-44946",
      "aliases": [
        "CVE-2024-44946"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ab7ac4eb9832e32a09f4e8042705484d2fb0aad3"
                },
                {
                  "fixed": "8c9cdbf600143bd6835c8b8351e5ac956da79aec"
                },
                {
                  "fixed": "6633b17840bf828921254d788ccd15602843fe9b"
                },
                {
                  "fixed": "eb06c8d3022ce6738711191c89f9b3e9cfb91914"
                },
                {
                  "fixed": "fa6c23fe6dcac8c8bd63920ee8681292a2bd544e"
                },
                {
                  "fixed": "72da240aafb142630cf16adc803ccdacb3780849"
                },
                {
                  "fixed": "00425508f30baa5ab6449a1f478480ca7cffa6da"
                },
                {
                  "fixed": "9c8d544ed619f704e2b70e63e08ab75630c2ea23"
                },
                {
                  "fixed": "807067bf014d4a3ae2cc55bd3de16f22a01eb580"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44946.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.6.0"
                },
                {
                  "fixed": "4.19.321"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.283"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.225"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.166"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.107"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.48"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.10.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-44946.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.228734848Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/00425508f30baa5ab6449a1f478480ca7cffa6da",
        "https://git.kernel.org/stable/c/6633b17840bf828921254d788ccd15602843fe9b",
        "https://git.kernel.org/stable/c/72da240aafb142630cf16adc803ccdacb3780849",
        "https://git.kernel.org/stable/c/807067bf014d4a3ae2cc55bd3de16f22a01eb580",
        "https://git.kernel.org/stable/c/8c9cdbf600143bd6835c8b8351e5ac956da79aec",
        "https://git.kernel.org/stable/c/9c8d544ed619f704e2b70e63e08ab75630c2ea23",
        "https://git.kernel.org/stable/c/eb06c8d3022ce6738711191c89f9b3e9cfb91914",
        "https://git.kernel.org/stable/c/fa6c23fe6dcac8c8bd63920ee8681292a2bd544e",
        "https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/44xxx/CVE-2024-44946.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-44946",
        "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/2024/44xxx/CVE-2024-44946.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-44946",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494560,
  "published_at": "2024-08-31T13:22:47.25+00:00"
}