Skip to content
Heist/ feed
Critical

ksmbd: ipc: fix use-after-free in ipc_msg_send_request

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: ksmbd: ipc: fix use-after-free in ipc_msg_send_request ipc_msg_send_request() waits for a generic netlink reply using an ipc_msg_table_entry on the stack. The generic netlink handler (handle_generic_event()/handle_response()) fills entry->response under ipc_msg_table_lock, but ipc_msg_send_request() used to validate and free entry->response without holding the same lock. Under high concurrency this allows a race where handle_response() is copying data into entry->response while ipc_msg_send_request() has just freed it, leading to a slab-use-after-free reported by KASAN in handle_generic_event(): BUG: KASAN: slab-use-after-free in handle_generic_event+0x3c4/0x5f0 [ksmbd] Write of size 12 at addr ffff888198ee6e20 by task pool/109349 ... Freed by task: kvfree ipc_msg_send_request [ksmbd] ksmbd_rpc_open -> ksmbd_session_rpc_open [ksmbd] Fix by: - Taking ipc_msg_table_lock in ipc_msg_send_request() while validating entry->response, freeing it when invalid, and removing the entry from ipc_msg_table. - Returning the final entry->response pointer to the caller only after the hash entry is removed under the lock. - Returning NULL in the error path, preserving the original API semantics. This makes all accesses to entry->response consistent with handle_response(), which already updates and fills the response buffer under ipc_msg_table_lock, and closes the race that allowed the UAF.

Announced Group revision 1
Original source ↗

CVE-2025-68263

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-68263

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "de85fb58f9967ba024bb08e0041613d37b57b4d1",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "708a620b471a14466f1f52c90bf3f65ebdb31460",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "5ac763713a1ef8f9a8bda1dbd81f0318d67baa4e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "759c8c30cfa8706c518e56f67971b1f0932f4b9b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "8229c6ca50cea701e25a7ee25f48441b582ec5fa",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
        "lessThan": "1fab1fa091f5aa97265648b53ea031deedd26235",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/smb/server/transport_ipc.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "5.15"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.15",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.1.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.120",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.62",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.17.12",
        "versionType": "semver",
        "lessThanOrEqual": "6.17.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.1",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "6.19",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/smb/server/transport_ipc.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-68263

Source reference: /cveMetadata/cveId

Publisher severity

critical

Source reference: /containers/cna/metrics

Event
#30734 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement