Bug 2424881 (CVE-2025-68366) - CVE-2025-68366 kernel: nbd: defer config unlock in nbd_genl_connect
Summary: CVE-2025-68366 kernel: nbd: defer config unlock in nbd_genl_connect
Keywords:
Status: NEW
Alias: CVE-2025-68366
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-24 11:03 UTC by OSIDB Bzimport
Modified: 2026-06-29 18:48 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:21209 0 None None None 2026-05-27 01:42:47 UTC
Red Hat Product Errata RHSA-2026:21556 0 None None None 2026-05-28 01:23:56 UTC
Red Hat Product Errata RHSA-2026:23224 0 None None None 2026-06-04 12:16:44 UTC
Red Hat Product Errata RHSA-2026:23329 0 None None None 2026-06-04 14:53:47 UTC
Red Hat Product Errata RHSA-2026:24343 0 None None None 2026-06-08 03:03:24 UTC
Red Hat Product Errata RHSA-2026:25120 0 None None None 2026-06-10 20:00:14 UTC
Red Hat Product Errata RHSA-2026:25121 0 None None None 2026-06-10 21:38:59 UTC
Red Hat Product Errata RHSA-2026:25533 0 None None None 2026-06-12 19:51:39 UTC
Red Hat Product Errata RHSA-2026:26462 0 None None None 2026-06-17 01:13:49 UTC
Red Hat Product Errata RHSA-2026:26515 0 None None None 2026-06-17 06:33:27 UTC
Red Hat Product Errata RHSA-2026:26535 0 None None None 2026-06-17 09:18:33 UTC
Red Hat Product Errata RHSA-2026:26563 0 None None None 2026-06-17 11:58:18 UTC

Description OSIDB Bzimport 2025-12-24 11:03:18 UTC
In the Linux kernel, the following vulnerability has been resolved:

nbd: defer config unlock in nbd_genl_connect

There is one use-after-free warning when running NBD_CMD_CONNECT and
NBD_CLEAR_SOCK:

nbd_genl_connect
  nbd_alloc_and_init_config // config_refs=1
  nbd_start_device // config_refs=2
  set NBD_RT_HAS_CONFIG_REF			open nbd // config_refs=3
  recv_work done // config_refs=2
						NBD_CLEAR_SOCK // config_refs=1
						close nbd // config_refs=0
  refcount_inc -> uaf

------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 24 PID: 1014 at lib/refcount.c:25 refcount_warn_saturate+0x12e/0x290
 nbd_genl_connect+0x16d0/0x1ab0
 genl_family_rcv_msg_doit+0x1f3/0x310
 genl_rcv_msg+0x44a/0x790

The issue can be easily reproduced by adding a small delay before
refcount_inc(&nbd->config_refs) in nbd_genl_connect():

        mutex_unlock(&nbd->config_lock);
        if (!ret) {
                set_bit(NBD_RT_HAS_CONFIG_REF, &config->runtime_flags);
+               printk("before sleep\n");
+               mdelay(5 * 1000);
+               printk("after sleep\n");
                refcount_inc(&nbd->config_refs);
                nbd_connect_reply(info, nbd->index);
        }

Comment 3 errata-xmlrpc 2026-05-27 01:42:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Extended Update Support

Via RHSA-2026:21209 https://access.redhat.com/errata/RHSA-2026:21209

Comment 4 errata-xmlrpc 2026-05-28 01:23:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:21556 https://access.redhat.com/errata/RHSA-2026:21556

Comment 5 errata-xmlrpc 2026-06-04 12:16:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:23224 https://access.redhat.com/errata/RHSA-2026:23224

Comment 6 errata-xmlrpc 2026-06-04 14:53:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:23329 https://access.redhat.com/errata/RHSA-2026:23329

Comment 7 errata-xmlrpc 2026-06-08 03:03:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:24343 https://access.redhat.com/errata/RHSA-2026:24343

Comment 10 errata-xmlrpc 2026-06-10 20:00:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:25120 https://access.redhat.com/errata/RHSA-2026:25120

Comment 11 errata-xmlrpc 2026-06-10 21:38:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:25121 https://access.redhat.com/errata/RHSA-2026:25121

Comment 12 errata-xmlrpc 2026-06-12 19:51:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On
  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support

Via RHSA-2026:25533 https://access.redhat.com/errata/RHSA-2026:25533

Comment 13 errata-xmlrpc 2026-06-17 01:13:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:26462 https://access.redhat.com/errata/RHSA-2026:26462

Comment 14 errata-xmlrpc 2026-06-17 06:33:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:26515 https://access.redhat.com/errata/RHSA-2026:26515

Comment 15 errata-xmlrpc 2026-06-17 09:18:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2026:26535 https://access.redhat.com/errata/RHSA-2026:26535

Comment 16 errata-xmlrpc 2026-06-17 11:58:16 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:26563 https://access.redhat.com/errata/RHSA-2026:26563


Note You need to log in before you can comment on or make changes to this bug.