{
  "threat_severity" : "Moderate",
  "public_date" : "2024-10-21T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: vdpa/mlx5: Fix invalid mr resource destroy",
    "id" : "2320214",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2320214"
  },
  "cvss3" : {
    "cvss3_base_score" : "5.5",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-908",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\nvdpa/mlx5: Fix invalid mr resource destroy\nCertain error paths from mlx5_vdpa_dev_add() can end up releasing mr\nresources which never got initialized in the first place.\nThis patch adds the missing check in mlx5_vdpa_destroy_mr_resources()\nto block releasing non-initialized mr resources.\nReference trace:\nmlx5_core 0000:08:00.2: mlx5_vdpa_dev_add:3274:(pid 2700) warning: No mac address provisioned?\nBUG: kernel NULL pointer dereference, address: 0000000000000000\n#PF: supervisor read access in kernel mode\n#PF: error_code(0x0000) - not-present page\nPGD 140216067 P4D 0\nOops: 0000 [#1] PREEMPT SMP NOPTI\nCPU: 8 PID: 2700 Comm: vdpa Kdump: loaded Not tainted 5.14.0-496.el9.x86_64 #1\nHardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014\nRIP: 0010:vhost_iotlb_del_range+0xf/0xe0 [vhost_iotlb]\nCode: [...]\nRSP: 0018:ff1c823ac23077f0 EFLAGS: 00010246\nRAX: ffffffffc1a21a60 RBX: ffffffff899567a0 RCX: 0000000000000000\nRDX: ffffffffffffffff RSI: 0000000000000000 RDI: 0000000000000000\nRBP: ff1bda1f7c21e800 R08: 0000000000000000 R09: ff1c823ac2307670\nR10: ff1c823ac2307668 R11: ffffffff8a9e7b68 R12: 0000000000000000\nR13: 0000000000000000 R14: ff1bda1f43e341a0 R15: 00000000ffffffea\nFS:  00007f56eba7c740(0000) GS:ff1bda269f800000(0000) knlGS:0000000000000000\nCS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 0000000000000000 CR3: 0000000104d90001 CR4: 0000000000771ef0\nDR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\nDR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\nPKRU: 55555554\nCall Trace:\n? show_trace_log_lvl+0x1c4/0x2df\n? show_trace_log_lvl+0x1c4/0x2df\n? mlx5_vdpa_free+0x3d/0x150 [mlx5_vdpa]\n? __die_body.cold+0x8/0xd\n? page_fault_oops+0x134/0x170\n? __irq_work_queue_local+0x2b/0xc0\n? irq_work_queue+0x2c/0x50\n? exc_page_fault+0x62/0x150\n? asm_exc_page_fault+0x22/0x30\n? __pfx_mlx5_vdpa_free+0x10/0x10 [mlx5_vdpa]\n? vhost_iotlb_del_range+0xf/0xe0 [vhost_iotlb]\nmlx5_vdpa_free+0x3d/0x150 [mlx5_vdpa]\nvdpa_release_dev+0x1e/0x50 [vdpa]\ndevice_release+0x31/0x90\nkobject_cleanup+0x37/0x130\nmlx5_vdpa_dev_add+0x2d2/0x7a0 [mlx5_vdpa]\nvdpa_nl_cmd_dev_add_set_doit+0x277/0x4c0 [vdpa]\ngenl_family_rcv_msg_doit+0xd9/0x130\ngenl_family_rcv_msg+0x14d/0x220\n? __pfx_vdpa_nl_cmd_dev_add_set_doit+0x10/0x10 [vdpa]\n? _copy_to_user+0x1a/0x30\n? move_addr_to_user+0x4b/0xe0\ngenl_rcv_msg+0x47/0xa0\n? __import_iovec+0x46/0x150\n? __pfx_genl_rcv_msg+0x10/0x10\nnetlink_rcv_skb+0x54/0x100\ngenl_rcv+0x24/0x40\nnetlink_unicast+0x245/0x370\nnetlink_sendmsg+0x206/0x440\n__sys_sendto+0x1dc/0x1f0\n? do_read_fault+0x10c/0x1d0\n? do_pte_missing+0x10d/0x190\n__x64_sys_sendto+0x20/0x30\ndo_syscall_64+0x5c/0xf0\n? __count_memcg_events+0x4f/0xb0\n? mm_account_fault+0x6c/0x100\n? handle_mm_fault+0x116/0x270\n? do_user_addr_fault+0x1d6/0x6a0\n? do_syscall_64+0x6b/0xf0\n? clear_bhb_loop+0x25/0x80\n? clear_bhb_loop+0x25/0x80\n? clear_bhb_loop+0x25/0x80\n? clear_bhb_loop+0x25/0x80\n? clear_bhb_loop+0x25/0x80\nentry_SYSCALL_64_after_hwframe+0x78/0x80" ],
  "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" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "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" : "Will not fix",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2024-47687\nhttps://nvd.nist.gov/vuln/detail/CVE-2024-47687\nhttps://lore.kernel.org/linux-cve-announce/2024102109-CVE-2024-47687-9a03@gregkh/T" ],
  "name" : "CVE-2024-47687",
  "csaw" : false
}