Skip to contentSkip to conversation

CVE-2026-80651: crypto: ccp/sev-dev-tsm - bail out early when pdev->bus is NULL

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

crypto: ccp/sev-dev-tsm - bail out early when pdev->bus is NULL

dsm_create() initially checks pdev->bus when computing segment_id:

	u8 segment_id = pdev->bus ? pci_domain_nr(pdev->bus) : 0;

But the next two lines unconditionally dereference pdev->bus via pcie_find_root_port() and especially pci_dev_id(pdev), which expands to PCI_DEVID(dev->bus->number, dev->devfn). If pdev->bus is in fact NULL, segment_id is initialised to 0 but the very next statement crashes the kernel.

smatch flags this:

drivers/crypto/ccp/sev-dev-tsm.c:253 dsm_create() error: we

    previously assumed 'pdev->bus' could be null (see line 251)

Make the NULL handling consistent: if pdev->bus is NULL the device has no PCI context to work with and SEV TIO setup cannot proceed, so return -ENODEV before any of the bus-dependent lookups. The remaining initialisation now runs only on the path where pdev->bus is known to be valid.

No change for callers where pdev->bus is non-NULL, which is the only case where dsm_create() did meaningful work before this change.

The Linux kernel CVE team has assigned CVE-2026-80651 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.19 with commit 4be423572da1f4c11f45168e3fafda870ddac9f8 and fixed in 7.1.5 with commit 6bafd740095fb3d0e9a00540bc8f3484c38e6f85
	Issue introduced in 6.19 with commit 4be423572da1f4c11f45168e3fafda870ddac9f8 and fixed in 7.2 with commit 930d9d36ea618a775985446a125aedeb401db522

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-80651

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/crypto/ccp/sev-dev-tsm.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/6bafd740095fb3d0e9a00540bc8f3484c38e6f85
	https://git.kernel.org/stable/c/930d9d36ea618a775985446a125aedeb401db522