{"id":"CVE-2026-139403","state":"PUBLISHED","title":"hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nhisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough\n\nWhen a PF is bound to the driver via driver_override and passed\nthrough to a VM, its pf_qm stays NULL. The PCI error handler\nreset_prepare() runs during open_device through\npci_try_reset_function(), before the mig_ops gate, and dereferences\nthe NULL pf_qm for the timeout log, crashing the kernel.\n\nMove the mig_ops check to the entry of reset_prepare() and\naer_reset_done() so non-migration devices skip the QM_RESETTING\ncoordination. The dev local resolved &qm->pdev->dev before the\ngate, so open code it at the dev_err() call where qm is known\nvalid. Also clear set_reset_flag together with QM_RESETTING in\naer_reset_done(); the flag was never cleared before, so a later\ntimed-out reset could release a foreign lock.","publishedAt":"2026-11-30T13:34:26.107Z","updatedAt":"2026-11-30T13:34:26.107Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"8f09ff41154f97258efeab05e965a7991d5ab51b","versionType":"git"},{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"8197c76ab20bc6040b1e136e823f164703482ac2","versionType":"git"},{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"e1d2d60b1f50296828d3f7ff26c45d1a90f142ef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c"]}],"references":["https://git.kernel.org/stable/c/8f09ff41154f97258efeab05e965a7991d5ab51b","https://git.kernel.org/stable/c/8197c76ab20bc6040b1e136e823f164703482ac2","https://git.kernel.org/stable/c/e1d2d60b1f50296828d3f7ff26c45d1a90f142ef"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139403.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139403","state":"PUBLISHED","datePublished":"2026-11-30T13:34:26.107Z","dateUpdated":"2026-11-30T13:34:26.107Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.931Z"},"containers":{"cna":{"title":"hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nhisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough\n\nWhen a PF is bound to the driver via driver_override and passed\nthrough to a VM, its pf_qm stays NULL. The PCI error handler\nreset_prepare() runs during open_device through\npci_try_reset_function(), before the mig_ops gate, and dereferences\nthe NULL pf_qm for the timeout log, crashing the kernel.\n\nMove the mig_ops check to the entry of reset_prepare() and\naer_reset_done() so non-migration devices skip the QM_RESETTING\ncoordination. The dev local resolved &qm->pdev->dev before the\ngate, so open code it at the dev_err() call where qm is known\nvalid. Also clear set_reset_flag together with QM_RESETTING in\naer_reset_done(); the flag was never cleared before, so a later\ntimed-out reset could release a foreign lock."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"8f09ff41154f97258efeab05e965a7991d5ab51b","versionType":"git"},{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"8197c76ab20bc6040b1e136e823f164703482ac2","versionType":"git"},{"version":"b0eed085903e7758532696d64397901a75bba8ba","status":"affected","lessThan":"e1d2d60b1f50296828d3f7ff26c45d1a90f142ef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8f09ff41154f97258efeab05e965a7991d5ab51b"},{"url":"https://git.kernel.org/stable/c/8197c76ab20bc6040b1e136e823f164703482ac2"},{"url":"https://git.kernel.org/stable/c/e1d2d60b1f50296828d3f7ff26c45d1a90f142ef"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:26.107Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}