{
  "threat_severity" : "Moderate",
  "public_date" : "2024-12-28T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: brd: defer automatic disk creation until module initialization succeeds",
    "id" : "2334683",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2334683"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.7",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-416",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nbrd: defer automatic disk creation until module initialization succeeds\nMy colleague Wupeng found the following problems during fault injection:\nBUG: unable to handle page fault for address: fffffbfff809d073\nPGD 6e648067 P4D 123ec8067 PUD 123ec4067 PMD 100e38067 PTE 0\nOops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI\nCPU: 5 UID: 0 PID: 755 Comm: modprobe Not tainted 6.12.0-rc3+ #17\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS\n1.16.1-2.fc37 04/01/2014\nRIP: 0010:__asan_load8+0x4c/0xa0\n...\nCall Trace:\n<TASK>\nblkdev_put_whole+0x41/0x70\nbdev_release+0x1a3/0x250\nblkdev_release+0x11/0x20\n__fput+0x1d7/0x4a0\ntask_work_run+0xfc/0x180\nsyscall_exit_to_user_mode+0x1de/0x1f0\ndo_syscall_64+0x6b/0x170\nentry_SYSCALL_64_after_hwframe+0x76/0x7e\nloop_init() is calling loop_add() after __register_blkdev() succeeds and\nis ignoring disk_add() failure from loop_add(), for loop_add() failure\nis not fatal and successfully created disks are already visible to\nbdev_open().\nbrd_init() is currently calling brd_alloc() before __register_blkdev()\nsucceeds and is releasing successfully created disks when brd_init()\nreturns an error. This can cause UAF for the latter two case:\ncase 1:\nT1:\nmodprobe brd\nbrd_init\nbrd_alloc(0) // success\nadd_disk\ndisk_scan_partitions\nbdev_file_open_by_dev // alloc file\nfput // won't free until back to userspace\nbrd_alloc(1) // failed since mem alloc error inject\n// error path for modprobe will release code segment\n// back to userspace\n__fput\nblkdev_release\nbdev_release\nblkdev_put_whole\nbdev->bd_disk->fops->release // fops is freed now, UAF!\ncase 2:\nT1:                            T2:\nmodprobe brd\nbrd_init\nbrd_alloc(0) // success\nopen(/dev/ram0)\nbrd_alloc(1) // fail\n// error path for modprobe\nclose(/dev/ram0)\n...\n/* UAF! */\nbdev->bd_disk->fops->release\nFix this problem by following what loop_init() does. Besides,\nreintroduce brd_devices_mutex to help serialize modifications to\nbrd_list." ],
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2025-05-13T00:00:00Z",
    "advisory" : "RHSA-2025:6966",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9",
    "package" : "kernel-0:5.14.0-570.12.1.el9_6"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Out of support scope",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "fix_state" : "Not affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "fix_state" : "Affected",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-56693\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-56693\nhttps://lore.kernel.org/linux-cve-announce/2024122835-CVE-2024-56693-b3c6@gregkh/T" ],
  "name" : "CVE-2024-56693",
  "csaw" : false
}