Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-31711 — kernel

🟠 CVSS 7.5 — High ✅ No Known Exploit NVD
7.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

smb: server: fix active_num_conn leak on transport allocation failure

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.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

Affected software

CVE-2026-31711 is recorded against 2 packages.

  • kernel (from 6.13.0 up to 7.0.2)
  • linux-kernel

Timeline and source

Published on 1 May 2026 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

CVE-2026-31711 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity High
CVSS Score 7.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2026-05-01
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.13.0 7.0.2
linux-kernel

Similar Threats

Site Security Check

Is kernel part of your stack?

CVE-2026-31711 is rated CVSS 7.5 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.