# CVE-2026-99691: ocfs2/cluster: unlink socket containers before releasing resources

- Severity: not scored yet
- 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.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-11-20T05:50:35.770Z
- Modified: 2026-11-23T08:18:10.047Z
- Assigned by: Linux

## Description

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

ocfs2/cluster: unlink socket containers before releasing resources

A socket container's node and socket must remain alive while the
container is on sock_containers. The debugfs formatter reads sc_node
and sc_sock under o2net_debug_lock without taking their references, but
sc_kref_release() releases both before taking that lock to unlink the
container.

With CONFIG_DEBUG_FS enabled, a synchronous sender can retain its last
socket-container reference after o2net_disconnect_node() has detached
the connection and flushed o2net_wq. The caller runs outside that
workqueue. After the sender removes its configfs dependency, node
removal can proceed without waiting for the sender's final sc_put():

  Sender (final sc_put)    Configfs rmdir        Debugfs reader
  --------------------    --------------        --------------
  o2nm_undepend_item()
                          Drop node item refs
  o2nm_node_put()
    [node can be freed]
                                               sc_seq_show()
                                                 Lock debug lock
                                                 Read sc_node->nd_name
                                                 Unlock debug lock
  sc_node = NULL
  o2net_debug_del_sc()

The earlier socket release has a similar window. The container is
still selectable while its socket has been released and sc_sock has
not yet been cleared:

  Sender (final sc_put)                       Debugfs reader
  --------------------                       --------------
  sock_release(sc->sc_sock)
    [socket can be freed]
                                             sc_seq_show()
                                               Lock debug lock
                                               Read sc_sock->sk fields
                                               Unlock debug lock
  sc_sock = NULL
  ...
  o2net_debug_del_sc()

Move o2net_debug_del_sc() before releasing either resource. Unlinking
under the existing debug lock waits for an active formatter to finish
and prevents later readers from selecting the container. This covers
both socket fields and node fields, including nd_num in the stats
formatter.

KASAN report as below:

    BUG: KASAN: slab-use-after-free in string+0x42b/0x470
    Read of size 1 at addr ffff88810f56fc90 by task python3/506

    CPU: 0 UID: 0 PID: 506 Comm: python3 Not tainted 7.3.0-rc4-next-20260921-pmb-ocfs2-functional-v1+ #1 PREEMPT(lazy)
    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    Call Trace:
     <TASK>
     dump_stack_lvl+0x93/0xd0
     print_report+0xce/0x630
     kasan_report+0xe0/0x110
     string+0x42b/0x470
     vsnprintf+0x330/0x1110
     seq_printf+0x1a8/0x260
     sc_seq_show+0x604/0x9f0
     seq_read_iter+0x480/0x1110
     seq_read+0x362/0x5a0
     full_proxy_read+0x11f/0x180
     vfs_read+0x1a0/0xc20
     ksys_read+0x111/0x200
     do_syscall_64+0x114/0x620
     entry_SYSCALL_64_after_hwframe+0x77/0x7f

(User register dump omitted.)

     </TASK>

    Allocated by task 497:
     kasan_save_stack+0x33/0x60
     kasan_save_track+0x14/0x30
     __kasan_kmalloc+0xaa/0xb0
     __kmalloc_cache_noprof+0x28d/0x610
     o2nm_node_group_make_item+0xea/0x1a0
     configfs_mkdir+0x762/0xca0
     vfs_mkdir+0x399/0x7e0
     filename_mkdirat+0x129/0x450
     __x64_sys_mkdir+0x70/0xa0
     do_syscall_64+0x114/0x620
     entry_SYSCALL_64_after_hwframe+0x77/0x7f

    Freed by task 505:
     kasan_save_stack+0x33/0x60
     kasan_save_track+0x14/0x30
     kasan_save_free_info+0x3b/0x60
     __kasan_slab_free+0x5f/0x80
     kfree+0x308/0x580
     config_item_cleanup+0x14b/0x230
     config_item_put+0x79/0x90
     sc_put+0x454/0x6e0
     o2net_send_message_vec+0x63d/0x1560
     o2net_send_message+0xa6/0xe0
     validation_send_write+0x17f/0x1d0
     full_proxy_write+0x11f/0x180
     vfs_write+0x25a/0x1010
     ksys_write+
---truncated---

(As written by CVE List.)

## Affected

- Linux Linux: from 2309e9e040fe29469fb85a384636c455b62fe525 before 87e985b95dc26ceb447418c56487c17c91420944; from 2309e9e040fe29469fb85a384636c455b62fe525 before d54c9f58305031bd09bdec135838a1bfb0586283; from 2309e9e040fe29469fb85a384636c455b62fe525 before 9672428efee9fb71d8d185ef352c797592b50a61; from 2309e9e040fe29469fb85a384636c455b62fe525 before ed62362be4da1e54ef41e6eb9ecfdd5f04b0db7b; from 2309e9e040fe29469fb85a384636c455b62fe525 before 8dc77ad4253904eb768f1aff45bb870d6d5a6eb5; from 2309e9e040fe29469fb85a384636c455b62fe525 before 829a331e1b52053c6f2d880daaa2f2c0ee85580f; from 2309e9e040fe29469fb85a384636c455b62fe525 before 831f6f917f7e22068d850efc6443eca300a11f95; from 2309e9e040fe29469fb85a384636c455b62fe525 before 0988f0c0c7c908f0ff77fd8b90ce9918a1f41479; 2.6.26 (not affected: before 2.6.26; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.118 up to 6.12.*; from 6.18.64 up to 6.18.*; from 7.3.5 up to 7.3.*; from 7.4-rc2 up to *)

## References

- <https://git.kernel.org/stable/c/87e985b95dc26ceb447418c56487c17c91420944>
- <https://git.kernel.org/stable/c/d54c9f58305031bd09bdec135838a1bfb0586283>
- <https://git.kernel.org/stable/c/9672428efee9fb71d8d185ef352c797592b50a61>
- <https://git.kernel.org/stable/c/ed62362be4da1e54ef41e6eb9ecfdd5f04b0db7b>
- <https://git.kernel.org/stable/c/8dc77ad4253904eb768f1aff45bb870d6d5a6eb5>
- <https://git.kernel.org/stable/c/829a331e1b52053c6f2d880daaa2f2c0ee85580f>
- <https://git.kernel.org/stable/c/831f6f917f7e22068d850efc6443eca300a11f95>
- <https://git.kernel.org/stable/c/0988f0c0c7c908f0ff77fd8b90ce9918a1f41479>

## Sources

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

---

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