CVE-2026-31711 (GCVE-0-2026-31711)

Vulnerability from cvelistv5 – Published: 2026-05-01 13:56 – Updated: 2026-05-03 05:45
VLAI?
Title
smb: server: fix active_num_conn leak on transport allocation failure
Summary
In the Linux kernel, the following vulnerability has been resolved: smb: server: fix active_num_conn leak on transport allocation failure Commit 77ffbcac4e56 ("smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection()") addressed the kthread_run() failure path. The earlier alloc_transport() == NULL path in the same function has the same leak, is reachable pre-authentication via any TCP connect to port 445, and was empirically reproduced on UML (ARCH=um, v7.0-rc7): a small number of forced allocation failures were sufficient to put ksmbd into a state where every subsequent connection attempt was rejected for the remainder of the boot. ksmbd_kthread_fn() increments active_num_conn before calling ksmbd_tcp_new_connection() and discards the return value, so when alloc_transport() returns NULL the socket is released and -ENOMEM returned without decrementing the counter. Each such failure permanently consumes one slot from the max_connections pool; once cumulative failures reach the cap, atomic_inc_return() hits the threshold on every subsequent accept and every new connection is rejected. The counter is only reset by module reload. An unauthenticated remote attacker can drive the server toward the memory pressure that makes alloc_transport() fail by holding open connections with large RFC1002 lengths up to MAX_STREAM_PROT_LEN (0x00FFFFFF); natural transient allocation failures on a loaded host produce the same drift more slowly. Mirror the existing rollback pattern in ksmbd_kthread_fn(): on the alloc_transport() failure path, decrement active_num_conn gated on server_conf.max_connections. Repro details: with the patch reverted, forced alloc_transport() NULL returns leaked counter slots and subsequent connection attempts -- including legitimate connects issued after the forced-fail window had closed -- were all rejected with "Limit the maximum number of connections". With this patch applied, the same connect sequence produces no rejections and the counter cycles cleanly between zero and one on every accept.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 , < 97f8d2648ef4871e4cd335e2d769cb40054a6772 (git)
Affected: 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 , < 295a9fc6789d1011c36ded9f0f2907bb34fa0de4 (git)
Affected: 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 , < 283027aa93380380a0994f35dde3ec95318f2654 (git)
Affected: 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 , < fb48185bcd946d42de7017cf27f912f8ab26acf0 (git)
Affected: 0d0d4680db22eda1eea785c47bbf66a9b33a8b16 , < 6551300dc452ac16a855a83dbd1e74899542d3b3 (git)
Affected: 4210c3555db4b38bade92331b153e583261f05f9 (git)
Affected: d5d7847e57ac69fa99c18b363a34419bcdb5a281 (git)
Create a notification for this product.
    Linux Linux Affected: 6.2
Unaffected: 0 , < 6.2 (semver)
Unaffected: 6.6.136 , ≤ 6.6.* (semver)
Unaffected: 6.12.84 , ≤ 6.12.* (semver)
Unaffected: 6.18.25 , ≤ 6.18.* (semver)
Unaffected: 7.0.2 , ≤ 7.0.* (semver)
Unaffected: 7.1-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "97f8d2648ef4871e4cd335e2d769cb40054a6772",
              "status": "affected",
              "version": "0d0d4680db22eda1eea785c47bbf66a9b33a8b16",
              "versionType": "git"
            },
            {
              "lessThan": "295a9fc6789d1011c36ded9f0f2907bb34fa0de4",
              "status": "affected",
              "version": "0d0d4680db22eda1eea785c47bbf66a9b33a8b16",
              "versionType": "git"
            },
            {
              "lessThan": "283027aa93380380a0994f35dde3ec95318f2654",
              "status": "affected",
              "version": "0d0d4680db22eda1eea785c47bbf66a9b33a8b16",
              "versionType": "git"
            },
            {
              "lessThan": "fb48185bcd946d42de7017cf27f912f8ab26acf0",
              "status": "affected",
              "version": "0d0d4680db22eda1eea785c47bbf66a9b33a8b16",
              "versionType": "git"
            },
            {
              "lessThan": "6551300dc452ac16a855a83dbd1e74899542d3b3",
              "status": "affected",
              "version": "0d0d4680db22eda1eea785c47bbf66a9b33a8b16",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "4210c3555db4b38bade92331b153e583261f05f9",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "d5d7847e57ac69fa99c18b363a34419bcdb5a281",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.2"
            },
            {
              "lessThan": "6.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.136",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.84",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.25",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.0.*",
              "status": "unaffected",
              "version": "7.0.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.1-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.136",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.84",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.25",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0.2",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1-rc1",
                  "versionStartIncluding": "6.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.15.91",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.1.9",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: server: fix active_num_conn leak on transport allocation failure\n\nCommit 77ffbcac4e56 (\"smb: server: fix leak of active_num_conn in\nksmbd_tcp_new_connection()\") addressed the kthread_run() failure\npath.  The earlier alloc_transport() == NULL path in the same\nfunction has the same leak, is reachable pre-authentication via any\nTCP connect to port 445, and was empirically reproduced on UML\n(ARCH=um, v7.0-rc7): a small number of forced allocation failures\nwere sufficient to put ksmbd into a state where every subsequent\nconnection attempt was rejected for the remainder of the boot.\n\nksmbd_kthread_fn() increments active_num_conn before calling\nksmbd_tcp_new_connection() and discards the return value, so when\nalloc_transport() returns NULL the socket is released and -ENOMEM\nreturned without decrementing the counter.  Each such failure\npermanently consumes one slot from the max_connections pool; once\ncumulative failures reach the cap, atomic_inc_return() hits the\nthreshold on every subsequent accept and every new connection is\nrejected.  The counter is only reset by module reload.\n\nAn unauthenticated remote attacker can drive the server toward the\nmemory pressure that makes alloc_transport() fail by holding open\nconnections with large RFC1002 lengths up to MAX_STREAM_PROT_LEN\n(0x00FFFFFF); natural transient allocation failures on a loaded\nhost produce the same drift more slowly.\n\nMirror the existing rollback pattern in ksmbd_kthread_fn(): on the\nalloc_transport() failure path, decrement active_num_conn gated on\nserver_conf.max_connections.\n\nRepro details: with the patch reverted, forced alloc_transport()\nNULL returns leaked counter slots and subsequent connection\nattempts -- including legitimate connects issued after the\nforced-fail window had closed -- were all rejected with \"Limit the\nmaximum number of connections\".  With this patch applied, the same\nconnect sequence produces no rejections and the counter cycles\ncleanly between zero and one on every accept."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          }
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-03T05:45:34.237Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/97f8d2648ef4871e4cd335e2d769cb40054a6772"
        },
        {
          "url": "https://git.kernel.org/stable/c/295a9fc6789d1011c36ded9f0f2907bb34fa0de4"
        },
        {
          "url": "https://git.kernel.org/stable/c/283027aa93380380a0994f35dde3ec95318f2654"
        },
        {
          "url": "https://git.kernel.org/stable/c/fb48185bcd946d42de7017cf27f912f8ab26acf0"
        },
        {
          "url": "https://git.kernel.org/stable/c/6551300dc452ac16a855a83dbd1e74899542d3b3"
        }
      ],
      "title": "smb: server: fix active_num_conn leak on transport allocation failure",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-31711",
    "datePublished": "2026-05-01T13:56:07.904Z",
    "dateReserved": "2026-03-09T15:48:24.133Z",
    "dateUpdated": "2026-05-03T05:45:34.237Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-31711",
      "date": "2026-05-05",
      "epss": "0.00194",
      "percentile": "0.40986"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-31711\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-05-01T14:16:21.150\",\"lastModified\":\"2026-05-03T07:16:18.427\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nsmb: server: fix active_num_conn leak on transport allocation failure\\n\\nCommit 77ffbcac4e56 (\\\"smb: server: fix leak of active_num_conn in\\nksmbd_tcp_new_connection()\\\") addressed the kthread_run() failure\\npath.  The earlier alloc_transport() == NULL path in the same\\nfunction has the same leak, is reachable pre-authentication via any\\nTCP connect to port 445, and was empirically reproduced on UML\\n(ARCH=um, v7.0-rc7): a small number of forced allocation failures\\nwere sufficient to put ksmbd into a state where every subsequent\\nconnection attempt was rejected for the remainder of the boot.\\n\\nksmbd_kthread_fn() increments active_num_conn before calling\\nksmbd_tcp_new_connection() and discards the return value, so when\\nalloc_transport() returns NULL the socket is released and -ENOMEM\\nreturned without decrementing the counter.  Each such failure\\npermanently consumes one slot from the max_connections pool; once\\ncumulative failures reach the cap, atomic_inc_return() hits the\\nthreshold on every subsequent accept and every new connection is\\nrejected.  The counter is only reset by module reload.\\n\\nAn unauthenticated remote attacker can drive the server toward the\\nmemory pressure that makes alloc_transport() fail by holding open\\nconnections with large RFC1002 lengths up to MAX_STREAM_PROT_LEN\\n(0x00FFFFFF); natural transient allocation failures on a loaded\\nhost produce the same drift more slowly.\\n\\nMirror the existing rollback pattern in ksmbd_kthread_fn(): on the\\nalloc_transport() failure path, decrement active_num_conn gated on\\nserver_conf.max_connections.\\n\\nRepro details: with the patch reverted, forced alloc_transport()\\nNULL returns leaked counter slots and subsequent connection\\nattempts -- including legitimate connects issued after the\\nforced-fail window had closed -- were all rejected with \\\"Limit the\\nmaximum number of connections\\\".  With this patch applied, the same\\nconnect sequence produces no rejections and the counter cycles\\ncleanly between zero and one on every accept.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":7.5,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":3.6}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/283027aa93380380a0994f35dde3ec95318f2654\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/295a9fc6789d1011c36ded9f0f2907bb34fa0de4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6551300dc452ac16a855a83dbd1e74899542d3b3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/97f8d2648ef4871e4cd335e2d769cb40054a6772\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/fb48185bcd946d42de7017cf27f912f8ab26acf0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…