{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-46058",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-46058"
  ],
  "published": "2026-05-27T12:59:23Z",
  "summary": "media: amphion: Fix race between m2m job_abort and device_run",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: amphion: Fix race between m2m job_abort and device_run\n\nFix kernel panic caused by race condition where v4l2_m2m_ctx_release()\nfrees m2m_ctx while v4l2_m2m_try_run() is about to call device_run\nwith the same context.\n\nRace sequence:\n  v4l2_m2m_try_run():           v4l2_m2m_ctx_release():\n    lock/unlock                   v4l2_m2m_cancel_job()\n                                    job_abort()\n                                      v4l2_m2m_job_finish()\n                                  kfree(m2m_ctx)  <- frees ctx\n    device_run()  <- use-after-free crash at 0x538\n\nCrash trace:\n  Unable to handle kernel read from unreadable memory at virtual address\n  0000000000000538\n  v4l2_m2m_try_run+0x78/0x138\n  v4l2_m2m_device_run_work+0x14/0x20\n\nThe amphion vpu driver does not rely on the m2m framework's device_run\ncallback to perform encode/decode operations.\n\nFix the race by preventing m2m framework job scheduling entirely:\n- Add job_ready callback returning 0 (no jobs ready for m2m framework)\n- Remove job_abort callback to avoid the race condition",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.175",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-46058"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/516467052fdfc6a13eadc70d43420ae57436bf3c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/42dc622776f3ce1a6c31b13bdc686f7295e3b323"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/da4f46c5cf1d26e6b09418ad453e152f2e75a02c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/fdc150dac1adb9a98be9d6956cff0348838b024a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/6be2cb75bc1300080cfc8051579f22efae9401f7"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8cd35ceadcfc8c5da2eb7f7ce24525ce9d4ee62e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T13:16:28Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The amphion VPU is a V4L2 mem2mem device reached only through a local `/dev/videoN` device file via open/ioctl/close; there is no network or remote path to this code.\nAC:L - The flaw is a race the attacker fully controls by running one thread that streams/queues buffers (scheduling a job) and another that closes the fd (triggering release); it can be retried in a loop until won.\nPR:L - Exploitation requires a local unprivileged user with access to the V4L2 device node (typically granted via the video group or logged-in session ACL); no root is needed.\nUI:N - The attacker performs all steps (open, stream, concurrent close) itself; no action by any other user is required.\nS:U - The vulnerability and its impact are confined to the kernel's own security authority with no crossing of a VM/IOMMU/sandbox boundary.\nC:H - The freed `m2m_ctx` is dereferenced after `kfree` (use-after-free per the fix), and a UAF over a slab object the attacker can groom/reallocate is treated as enabling arbitrary read of freed contents.\nI:H - The use-after-free on the freed context permits heap grooming/reallocation of the object that is then dereferenced, providing a write/control primitive consistent with kernel UAF integrity impact.\nA:H - The race reliably faults on an invalid pointer in `v4l2_m2m_try_run`, producing a kernel oops/panic and denial of service."
    }
  }
}
