{
  "threat_severity" : "Moderate",
  "public_date" : "2025-06-18T00:00:00Z",
  "bugzilla" : {
    "description" : "kernel: coresight: Clear the connection field properly",
    "id" : "2373513",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2373513"
  },
  "cvss3" : {
    "cvss3_base_score" : "6.4",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-825",
  "details" : [ "In the Linux kernel, the following vulnerability has been resolved:\ncoresight: Clear the connection field properly\ncoresight devices track their connections (output connections) and\nhold a reference to the fwnode. When a device goes away, we walk through\nthe devices on the coresight bus and make sure that the references\nare dropped. This happens both ways:\na) For all output connections from the device, drop the reference to\nthe target device via coresight_release_platform_data()\nb) Iterate over all the devices on the coresight bus and drop the\nreference to fwnode if *this* device is the target of the output\nconnection, via coresight_remove_conns()->coresight_remove_match().\nHowever, the coresight_remove_match() doesn't clear the fwnode field,\nafter dropping the reference, this causes use-after-free and\nadditional refcount drops on the fwnode.\ne.g., if we have two devices, A and B, with a connection, A -> B.\nIf we remove B first, B would clear the reference on B, from A\nvia coresight_remove_match(). But when A is removed, it still has\na connection with fwnode still pointing to B. Thus it tries to  drops\nthe reference in coresight_release_platform_data(), raising the bells\nlike :\n[   91.990153] ------------[ cut here ]------------\n[   91.990163] refcount_t: addition on 0; use-after-free.\n[   91.990212] WARNING: CPU: 0 PID: 461 at lib/refcount.c:25 refcount_warn_saturate+0xa0/0x144\n[   91.990260] Modules linked in: coresight_funnel coresight_replicator coresight_etm4x(-)\ncrct10dif_ce coresight ip_tables x_tables ipv6 [last unloaded: coresight_cpu_debug]\n[   91.990398] CPU: 0 PID: 461 Comm: rmmod Tainted: G        W       T 5.19.0-rc2+ #53\n[   91.990418] Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb  1 2019\n[   91.990434] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n[   91.990454] pc : refcount_warn_saturate+0xa0/0x144\n[   91.990476] lr : refcount_warn_saturate+0xa0/0x144\n[   91.990496] sp : ffff80000c843640\n[   91.990509] x29: ffff80000c843640 x28: ffff800009957c28 x27: ffff80000c8439a8\n[   91.990560] x26: ffff00097eff1990 x25: ffff8000092b6ad8 x24: ffff00097eff19a8\n[   91.990610] x23: ffff80000c8439a8 x22: 0000000000000000 x21: ffff80000c8439c2\n[   91.990659] x20: 0000000000000000 x19: ffff00097eff1a10 x18: ffff80000ab99c40\n[   91.990708] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80000abf6fa0\n[   91.990756] x14: 000000000000001d x13: 0a2e656572662d72 x12: 657466612d657375\n[   91.990805] x11: 203b30206e6f206e x10: 6f69746964646120 x9 : ffff8000081aba28\n[   91.990854] x8 : 206e6f206e6f6974 x7 : 69646461203a745f x6 : 746e756f63666572\n[   91.990903] x5 : ffff00097648ec58 x4 : 0000000000000000 x3 : 0000000000000027\n[   91.990952] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00080260ba00\n[   91.991000] Call trace:\n[   91.991012]  refcount_warn_saturate+0xa0/0x144\n[   91.991034]  kobject_get+0xac/0xb0\n[   91.991055]  of_node_get+0x2c/0x40\n[   91.991076]  of_fwnode_get+0x40/0x60\n[   91.991094]  fwnode_handle_get+0x3c/0x60\n[   91.991116]  fwnode_get_nth_parent+0xf4/0x110\n[   91.991137]  fwnode_full_name_string+0x48/0xc0\n[   91.991158]  device_node_string+0x41c/0x530\n[   91.991178]  pointer+0x320/0x3ec\n[   91.991198]  vsnprintf+0x23c/0x750\n[   91.991217]  vprintk_store+0x104/0x4b0\n[   91.991238]  vprintk_emit+0x8c/0x360\n[   91.991257]  vprintk_default+0x44/0x50\n[   91.991276]  vprintk+0xcc/0xf0\n[   91.991295]  _printk+0x68/0x90\n[   91.991315]  of_node_release+0x13c/0x14c\n[   91.991334]  kobject_put+0x98/0x114\n[   91.991354]  of_node_put+0x24/0x34\n[   91.991372]  of_fwnode_put+0x40/0x5c\n[   91.991390]  fwnode_handle_put+0x38/0x50\n[   91.991411]  coresight_release_platform_data+0x74/0xb0 [coresight]\n[   91.991472]  coresight_unregister+0x64/0xcc [coresight]\n[   91.991525]  etm4_remove_dev+0x64/0x78 [coresight_etm4x]\n[   91.991563]  etm4_remove_amba+0x1c/0x2c [coresight_etm4x]\n[   91.991598]  amba_remove+0x3c/0x19c\n---truncated---" ],
  "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 10",
    "fix_state" : "Not affected",
    "package_name" : "kernel",
    "cpe" : "cpe:/o:redhat:enterprise_linux:10"
  }, {
    "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" : "Fix deferred",
    "package_name" : "kernel-rt",
    "cpe" : "cpe:/o:redhat:enterprise_linux:9"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2022-50214\nhttps://nvd.nist.gov/vuln/detail/CVE-2022-50214\nhttps://lore.kernel.org/linux-cve-announce/2025061844-CVE-2022-50214-6569@gregkh/T" ],
  "name" : "CVE-2022-50214",
  "csaw" : false
}