{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53034",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-53034"
  ],
  "published": "2025-04-16T14:14:59Z",
  "summary": "ntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nntb_hw_switchtec: Fix shift-out-of-bounds in switchtec_ntb_mw_set_trans\n\nThere is a kernel API ntb_mw_clear_trans() would pass 0 to both addr and\nsize. This would make xlate_pos negative.\n\n[   23.734156] switchtec switchtec0: MW 0: part 0 addr 0x0000000000000000 size 0x0000000000000000\n[   23.734158] ================================================================================\n[   23.734172] UBSAN: shift-out-of-bounds in drivers/ntb/hw/mscc/ntb_hw_switchtec.c:293:7\n[   23.734418] shift exponent -1 is negative\n\nEnsuring xlate_pos is a positive or zero before BIT.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.134",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53034"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f56951f211f181410a383d305e8d370993e45294"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5b6857bb3bfb0dae17fab1e42c1e82c204a508b1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2429bdf26a0f3950fdd996861e9c1a3873af1dbe"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7ed22f8d8be26225a78cf5e85b2036421a6bf2d5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c61a3f2df162ba424be0141649a9ef5f28eaccc1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/cb153bdc1812a3375639ed6ca5f147eaefb65349"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/36d32cfb00d42e865396424bb5d340fc0a28870d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/0df2e03e4620548b41891b4e0d1bd9d2e0d8a39a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/de203da734fae00e75be50220ba5391e7beecdf9"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.1,
      "cvss_v3_severity": "High",
      "scenario": "AV:A - In the highest reasonable Switchtec deployment, dual hosts share a PCIe NTB fabric; a peer link-down notifies ntb_transport, which calls ntb_free_mw \u2192 ntb_mw_clear_trans and hits the vulnerable path without needing local code execution on the victim.\nAC:L - Once ntb_transport has set up memory windows, bringing the NTB link down deterministically schedules link_cleanup and invokes clear_trans with addr=0/size=0; no race or uncontrolled layout is required.\nPR:N - A peer on the NTB fabric can force link-down and trigger cleanup without any account or capability on the victim host; local debugfs/module paths need root, but the peer path needs none.\nUI:N - Link-state handling and MW teardown run in kernel workqueues from the NTB event path; no separate victim user action is required after the NTB stack is in use.\nS:U - Impact stays in the local kernel/host authority; this is not a VM escape, IOMMU bypass, or other cross-boundary compromise.\nC:L - The undefined shift is used only inside IS_ALIGNED() and is not an out-of-bounds memory read; under the overestimate rule for UBSAN/UB shift faults, limited confidentiality impact is appropriate rather than None or High.\nI:N - The bad shift does not write kernel memory or reprogram windows with attacker-controlled data; on size==0 the function still takes the clear path, so there is no integrity/write primitive.\nA:H - UBSAN reports shift-out-of-bounds on this path, and with UBSAN_TRAP or panic_on_warn the fault becomes a kernel trap/panic, which is high availability impact."
    }
  }
}
