---
id: CVE-2026-98162
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  smb/server: fix tree connection leak in smb2_tree_connect()

  See the procedure below:

    smb2_tree_connect
      ksmbd_tree_conn_connect
        xa_store(&sess->tree_conns,…
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  smb/server: fix tree connection leak in smb2_tree_connect()

  See the procedure below:

    smb2_tree_connect
      ksmbd_tree_conn_connect
        xa_store(&sess->tree_conns,…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-401
  - CWE-772
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.15.145, < 5.16'
  - 'linux_kernel >= 6.1.71, < 6.2'
  - 'linux_kernel >= 6.6, < 7.2.6'
patched:
  - linux_kernel 7.2.6
published: '2026-09-25'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T11:18:12.070'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-98162'
references:
  - url: 'https://git.kernel.org/stable/c/39f2032096715daae5f6fd0f587ca7a474b019df'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/fea9c705bbc618ba6426424c9f8330555820c9ec'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-98162.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-98162'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2541417'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-98162'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-98162'
  - url: >-
      https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98162.mbox
  - url: 'https://git.kernel.org/stable/c/fa0c45986fc60b3edfb35879f2fb0eacc0e49e98'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
epss: 0.00114
epssPercentile: 0.01443
ingestedAt: '2026-09-25T14:09:46.373Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

smb/server: fix tree connection leak in smb2_tree_connect()

See the procedure below:

  smb2_tree_connect
    ksmbd_tree_conn_connect
      xa_store(&sess->tree_conns, tree_conn->id, tree_conn)
      ksmbd_counter_inc(KSMBD_COUNTER_TREE_CONNS)
      ksmbd_share_tree_conn_inc(sc)
    ksmbd_iov_pin_rsp // fail
    status.ret = KSMBD_TREE_CONN_STATUS_NOMEM
    // do not disconnect tree_conn

Disconnect the new tree connection if ksmbd_iov_pin_rsp() fails.

## Affected

- `linux_kernel >= 5.15.145, < 5.16`
- `linux_kernel >= 6.1.71, < 6.2`
- `linux_kernel >= 6.6, < 7.2.6`

## Remediation

Upgrade past the affected range:

- `linux_kernel 7.2.6`

## Vendor advisories

- **Red Hat VEX** · Moderate · updated 2026-10-02 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-98162.json)
