cvelo
P2 · HighCVSS 9.8EPSS 0.5%

ksmbd: fix use-after-free in oplock break notification

  • CVE-2026-80926
  • GHSA-4r76-cqqc-v36j
  • EUVD-2026-76248

Description

Show the whole description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in oplock break notification smb2_oplock_break_noti() reads opinfo->conn without any lock and dereferences it after two allocations which may sleep. When the durable handle owning the oplock is disconnected, session_fd_check() clears opinfo->conn and drops its conn reference under ci->m_lock, and the last ksmbd_conn_put() frees the connection. A break triggered by another connection that races with the teardown can then resurrect the freed connection: ksmbd_conn_get() is a plain atomic_inc, and the queued break work later dereferences the stale conn via ksmbd_conn_write(), a use-after-free reachable by any authenticated client holding a durable batch oplock. Thread the caller's inode into the notification path instead of taking a new reference on it. Every caller of oplock_break() already holds a live ksmbd_file (or an explicit ksmbd_inode_lookup_lock() reference, in the parent lease break paths) on the inode that owns the break target's oplock list, so ci cannot be freed during the call, and its lock can be taken without dereferencing opinfo->o_fp, which a concurrent close may free. Select and pin the connection under ci->m_lock, the same lock session_fd_check() and ksmbd_reopen_durable_fd() use to update opinfo->conn, so a concurrent detach either loses the race to the clear or keeps the connection alive until the notification work releases it. Transfer the reference to the work item and release it on allocation failures.

Text from the CVE.org record.

Recommendation

  • Linux

    • If you run 6.18.xupdate to 6.18.51 or laterPatch update: breaking changes are unlikely
    • If you run 6.12.xupdate to 6.12.111 or laterPatch update: breaking changes are unlikely
    • If you run 6.6.xupdate to 6.6.158 or laterPatch update: breaking changes are unlikely

    Some affected versions have no stated fix.

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • Linux

    Affected versionsFixed in
    from 6.18.36 to before 6.18.516.18.51
    from 6.12.94 to before 6.12.1116.12.111
    from 6.6.143 to before 6.6.1586.6.158
    from 7.0.13 to before 7.1none stated
    7.1none stated
    before 7.1: not affectednone stated
    from 6.6.158 up to 6.6.*: not affectednone stated
    from 6.12.111 up to 6.12.*: not affectednone stated

    and 3 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.