# CVE-2026-98162: smb/server: fix tree connection leak in smb2_tree_connect()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-01)
- Published: 2026-09-25T13:06:51.778Z
- Modified: 2026-10-21T13:21:24.797Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d before fa0c45986fc60b3edfb35879f2fb0eacc0e49e98; from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d before fea9c705bbc618ba6426424c9f8330555820c9ec; from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d before a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc; from e2b76ab8b5c9327ab2dae6da05d0752eb2f4771d before 39f2032096715daae5f6fd0f587ca7a474b019df; f2283680a80571ca82d710bc6ecd8f8beac67d63; 9f297df20d93411c0b4ddad7f88ba04a7cd36e77; from 5.15.145 before 5.16; from 6.1.71 before 6.2; 6.6 (not affected: before 6.6; from 6.6.160 up to 6.6.*; from 6.18.57 up to 6.18.*; from 7.2.6 up to 7.2.*; from 7.3 up to *)
- linux linux_kernel: from 5.15.145 before 5.16; from 6.1.71 before 6.2; from 6.6 before 7.2.6

## References

- <https://git.kernel.org/stable/c/fa0c45986fc60b3edfb35879f2fb0eacc0e49e98>
- <https://git.kernel.org/stable/c/fea9c705bbc618ba6426424c9f8330555820c9ec>
- <https://git.kernel.org/stable/c/a6c88e5e3a75f1e4a98ad4bc4037465ccd7925bc> (patch)
- <https://git.kernel.org/stable/c/39f2032096715daae5f6fd0f587ca7a474b019df> (patch)

## Sources

- CVE List: [CVE-2026-98162](https://www.cve.org/CVERecord?id=CVE-2026-98162), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2026-98162](https://nvd.nist.gov/vuln/detail/CVE-2026-98162), Public domain, modified 2026-10-21

---

Page: https://cve.day/CVE-2026-98162 · Whole record: https://cve.day/CVE-2026-98162.json · Rebuilt by cve.day 2026-11-25T22:59:41.098Z
