{
  "id": "CVE-2026-31711",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-31711",
  "published_at": "2026-05-01T13:56:07.904Z",
  "title": "smb: server: fix active_num_conn leak on transport allocation failure",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.5,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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.",
  "cwe": "CWE-401",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.2:-:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.2:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.2:rc7:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.2:rc8:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 4210c3555db4b38bade92331b153e583261f05f9, \u003c dc2e7d595d68cf1be1ba64e3d30ebf3266bf7242",
          "\u003e= d5d7847e57ac69fa99c18b363a34419bcdb5a281, \u003c 60734c8bc3b4aa0672e251f08dda81977e4b5387",
          "\u003e= 0d0d4680db22eda1eea785c47bbf66a9b33a8b16, \u003c 97f8d2648ef4871e4cd335e2d769cb40054a6772",
          "\u003e= 0d0d4680db22eda1eea785c47bbf66a9b33a8b16, \u003c 295a9fc6789d1011c36ded9f0f2907bb34fa0de4",
          "\u003e= 0d0d4680db22eda1eea785c47bbf66a9b33a8b16, \u003c 283027aa93380380a0994f35dde3ec95318f2654",
          "\u003e= 0d0d4680db22eda1eea785c47bbf66a9b33a8b16, \u003c fb48185bcd946d42de7017cf27f912f8ab26acf0",
          "\u003e= 0d0d4680db22eda1eea785c47bbf66a9b33a8b16, \u003c 6551300dc452ac16a855a83dbd1e74899542d3b3",
          "\u003e= 5.15.91, \u003c 5.15.210",
          "\u003e= 6.1.9, \u003c 6.1.175"
        ],
        "fixed_in": [
          "dc2e7d595d68cf1be1ba64e3d30ebf3266bf7242",
          "60734c8bc3b4aa0672e251f08dda81977e4b5387",
          "97f8d2648ef4871e4cd335e2d769cb40054a6772",
          "295a9fc6789d1011c36ded9f0f2907bb34fa0de4",
          "283027aa93380380a0994f35dde3ec95318f2654",
          "fb48185bcd946d42de7017cf27f912f8ab26acf0",
          "6551300dc452ac16a855a83dbd1e74899542d3b3",
          "5.15.210",
          "6.1.175"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.2"
        ],
        "fixed_in": [
          "0",
          "5.15.210",
          "6.1.175",
          "6.6.136",
          "6.12.84",
          "6.18.25",
          "7.0.2",
          "7.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to dc2e7d595d68cf1be1ba64e3d30ebf3266bf7242 or 60734c8bc3b4aa0672e251f08dda81977e4b5387 or 97f8d2648ef4871e4cd335e2d769cb40054a6772 or 295a9fc6789d1011c36ded9f0f2907bb34fa0de4 or 283027aa93380380a0994f35dde3ec95318f2654 or fb48185bcd946d42de7017cf27f912f8ab26acf0 or 6551300dc452ac16a855a83dbd1e74899542d3b3 or 5.15.210 or 6.1.175 or later.",
      "Upgrade Linux to 0 or 5.15.210 or 6.1.175 or 6.6.136 or 6.12.84 or 6.18.25 or 7.0.2 or 7.1 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
