Skip to content
Heist/ feed
High

bpf: Fix UAF in sock clone early bailouts

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix UAF in sock clone early bailouts Similar to recent commit 9b51a6155d14 ("bpf,fork: wipe ->bpf_storage before bailouts that access it"), sk_clone() performs an initial shallow copy of the socket field ->sk_bpf_storage via sock_copy() for the cloned socket newsk. If sk_clone() bails out early (e.g. if sk_filter_charge() fails) prior to calling bpf_sk_storage_clone(), newsk->sk_bpf_storage still points to the parent socket's BPF local storage. When newsk is subsequently freed via sk_free(), the deallocation path (__sk_destruct() -> bpf_sk_storage_free()) destroys the parent socket's BPF local storage, leading to a use-after-free (UAF) on the parent socket. Fix this by resetting newsk->sk_bpf_storage to NULL immediately after sock_copy() in sk_clone(), and remove the now redundant initialization from bpf_sk_storage_clone().

Announced Group revision 1
Original source ↗

CVE-2026-68399

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-2026-68399

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": "6ac99e8f23d4b10258406ca0dd7bffca5f31da9d",
        "lessThan": "f6814814b3bdd6ecb6bc1fc53ba4e827e0185f01",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "6ac99e8f23d4b10258406ca0dd7bffca5f31da9d",
        "lessThan": "24139461545e44442df9b80deace26b2eb3e103d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "6ac99e8f23d4b10258406ca0dd7bffca5f31da9d",
        "lessThan": "01f8a354497ba739f81b691b3702bc4c46500a4d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "6ac99e8f23d4b10258406ca0dd7bffca5f31da9d",
        "lessThan": "14b49b5ab29979552c219a09e569b424fbbf4a6e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "6ac99e8f23d4b10258406ca0dd7bffca5f31da9d",
        "lessThan": "7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "net/core/bpf_sk_storage.c",
      "net/core/sock.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.2"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "5.2",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.114",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.57",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.1.6",
        "versionType": "semver",
        "lessThanOrEqual": "7.1.*"
      },
      {
        "status": "unaffected",
        "version": "7.2",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "net/core/bpf_sk_storage.c",
      "net/core/sock.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-68399

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

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