{"api_version":"1","generated_at":"2026-11-30T14:49:37+00:00","cve":"CVE-2026-138968","urls":{"html":"https://cve.report/CVE-2026-138968","api":"https://cve.report/api/cve/CVE-2026-138968.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138968","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138968"},"summary":{"title":"iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()\n\nCallers request a full Device-TLB flush by passing MAX_AGAW_PFN_WIDTH\n(64 - VTD_PAGE_SHIFT == 52) as @size_order.  Two expressions in\nqi_desc_dev_iotlb_pasid() are not prepared for a value that large:\n\n  unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size_order - 1);\n  ...\n  if (!IS_ALIGNED(addr, VTD_PAGE_SIZE << size_order))\n\nThe second evaluates to 1UL << 64, which is undefined on all\narchitectures.  On x86_64 the shift count masks to zero, IS_ALIGNED(addr,\n1) is trivially true, and the alignment sanity check silently degrades\ninto a no-op.\n\nThe first evaluates to 1UL << 63.  That is well defined on 64-bit builds,\nwhere unsigned long is 64 bits wide, but is undefined on 32-bit ones.  In\npractice x86 masks the shift count to five bits, so the expression yields\n1UL << 31 and ~mask becomes 0x7fffffff.  That value is zero-extended when\napplied to the 64-bit descriptor, so\n\n  desc->qw1 &= ~mask;\n\nclears qw1[63:32] as well as bit 31, collapsing the ADDR field that had\njust been filled with ones.  Reaching that requires a scalable-mode PASID\nconfiguration on 32-bit x86, which is not a realistic deployment, but the\nconstruct is wrong regardless.\n\nCompute the mask with BIT_ULL() so that it is 64-bit on every\narchitecture, and skip the alignment check for a full flush, where it is\nboth meaningless and the source of the out-of-range shift.\n\nNote that @size_order must not be clamped below 64 - VTD_PAGE_SHIFT.  With\nS set, hardware derives the invalidation range from the least significant\nzero bit N of ADDR and matches bits [63:N+1] of the incoming address.  For\nsize_order 52 the descriptor sets ADDR[63:12] and clears bit 63, making\nN = 63 and the comparison range empty, so everything is invalidated.\nReducing @size_order to 51 would instead leave N = 62 and cause hardware\nto compare address bit 63; since callers pass an address of 0, only the\nlower half of the address space would be invalidated.  Bound @size_order\nat 64 - VTD_PAGE_SHIFT so that a bogus caller cannot reintroduce an\nout-of-range shift, without altering the full-flush encoding.\n\nThe non-PASID variant qi_desc_dev_iotlb() already uses 1ULL and is\nunaffected.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:58","updated_at":"2026-11-30 14:17:58"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/675c26291463079931a076c06be111759574b3e0","name":"https://git.kernel.org/stable/c/675c26291463079931a076c06be111759574b3e0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/46bfb435097bd730f1b687275a94ab0c13a65593","name":"https://git.kernel.org/stable/c/46bfb435097bd730f1b687275a94ab0c13a65593","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ddea230c9fc28d1f2090ceeab3d66ce2bea658e9","name":"https://git.kernel.org/stable/c/ddea230c9fc28d1f2090ceeab3d66ce2bea658e9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e8168221d3c7d05b6533a36d9395aa27c578cba8","name":"https://git.kernel.org/stable/c/e8168221d3c7d05b6533a36d9395aa27c578cba8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138968","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138968","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f701c9f36bcb7940f9c53413b508de8c9cb0321c 46bfb435097bd730f1b687275a94ab0c13a65593 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f701c9f36bcb7940f9c53413b508de8c9cb0321c e8168221d3c7d05b6533a36d9395aa27c578cba8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f701c9f36bcb7940f9c53413b508de8c9cb0321c 675c26291463079931a076c06be111759574b3e0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f701c9f36bcb7940f9c53413b508de8c9cb0321c ddea230c9fc28d1f2090ceeab3d66ce2bea658e9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.117 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/iommu/intel/iommu.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"46bfb435097bd730f1b687275a94ab0c13a65593","status":"affected","version":"f701c9f36bcb7940f9c53413b508de8c9cb0321c","versionType":"git"},{"lessThan":"e8168221d3c7d05b6533a36d9395aa27c578cba8","status":"affected","version":"f701c9f36bcb7940f9c53413b508de8c9cb0321c","versionType":"git"},{"lessThan":"675c26291463079931a076c06be111759574b3e0","status":"affected","version":"f701c9f36bcb7940f9c53413b508de8c9cb0321c","versionType":"git"},{"lessThan":"ddea230c9fc28d1f2090ceeab3d66ce2bea658e9","status":"affected","version":"f701c9f36bcb7940f9c53413b508de8c9cb0321c","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/iommu/intel/iommu.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.12"},{"lessThan":"6.12","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.117","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"6.12","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.12","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()\n\nCallers request a full Device-TLB flush by passing MAX_AGAW_PFN_WIDTH\n(64 - VTD_PAGE_SHIFT == 52) as @size_order.  Two expressions in\nqi_desc_dev_iotlb_pasid() are not prepared for a value that large:\n\n  unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size_order - 1);\n  ...\n  if (!IS_ALIGNED(addr, VTD_PAGE_SIZE << size_order))\n\nThe second evaluates to 1UL << 64, which is undefined on all\narchitectures.  On x86_64 the shift count masks to zero, IS_ALIGNED(addr,\n1) is trivially true, and the alignment sanity check silently degrades\ninto a no-op.\n\nThe first evaluates to 1UL << 63.  That is well defined on 64-bit builds,\nwhere unsigned long is 64 bits wide, but is undefined on 32-bit ones.  In\npractice x86 masks the shift count to five bits, so the expression yields\n1UL << 31 and ~mask becomes 0x7fffffff.  That value is zero-extended when\napplied to the 64-bit descriptor, so\n\n  desc->qw1 &= ~mask;\n\nclears qw1[63:32] as well as bit 31, collapsing the ADDR field that had\njust been filled with ones.  Reaching that requires a scalable-mode PASID\nconfiguration on 32-bit x86, which is not a realistic deployment, but the\nconstruct is wrong regardless.\n\nCompute the mask with BIT_ULL() so that it is 64-bit on every\narchitecture, and skip the alignment check for a full flush, where it is\nboth meaningless and the source of the out-of-range shift.\n\nNote that @size_order must not be clamped below 64 - VTD_PAGE_SHIFT.  With\nS set, hardware derives the invalidation range from the least significant\nzero bit N of ADDR and matches bits [63:N+1] of the incoming address.  For\nsize_order 52 the descriptor sets ADDR[63:12] and clears bit 63, making\nN = 63 and the comparison range empty, so everything is invalidated.\nReducing @size_order to 51 would instead leave N = 62 and cause hardware\nto compare address bit 63; since callers pass an address of 0, only the\nlower half of the address space would be invalidated.  Bound @size_order\nat 64 - VTD_PAGE_SHIFT so that a bogus caller cannot reintroduce an\nout-of-range shift, without altering the full-flush encoding.\n\nThe non-PASID variant qi_desc_dev_iotlb() already uses 1ULL and is\nunaffected."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:26:39.162Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/46bfb435097bd730f1b687275a94ab0c13a65593"},{"url":"https://git.kernel.org/stable/c/e8168221d3c7d05b6533a36d9395aa27c578cba8"},{"url":"https://git.kernel.org/stable/c/675c26291463079931a076c06be111759574b3e0"},{"url":"https://git.kernel.org/stable/c/ddea230c9fc28d1f2090ceeab3d66ce2bea658e9"}],"title":"iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138968","datePublished":"2026-11-30T13:26:39.162Z","dateReserved":"2026-11-30T13:22:15.906Z","dateUpdated":"2026-11-30T13:26:39.162Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:58","lastModifiedDate":"2026-11-30 14:17:58","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138968","Ordinal":"1","Title":"iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid(","CVE":"CVE-2026-138968","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138968","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()\n\nCallers request a full Device-TLB flush by passing MAX_AGAW_PFN_WIDTH\n(64 - VTD_PAGE_SHIFT == 52) as @size_order.  Two expressions in\nqi_desc_dev_iotlb_pasid() are not prepared for a value that large:\n\n  unsigned long mask = 1UL << (VTD_PAGE_SHIFT + size_order - 1);\n  ...\n  if (!IS_ALIGNED(addr, VTD_PAGE_SIZE << size_order))\n\nThe second evaluates to 1UL << 64, which is undefined on all\narchitectures.  On x86_64 the shift count masks to zero, IS_ALIGNED(addr,\n1) is trivially true, and the alignment sanity check silently degrades\ninto a no-op.\n\nThe first evaluates to 1UL << 63.  That is well defined on 64-bit builds,\nwhere unsigned long is 64 bits wide, but is undefined on 32-bit ones.  In\npractice x86 masks the shift count to five bits, so the expression yields\n1UL << 31 and ~mask becomes 0x7fffffff.  That value is zero-extended when\napplied to the 64-bit descriptor, so\n\n  desc->qw1 &= ~mask;\n\nclears qw1[63:32] as well as bit 31, collapsing the ADDR field that had\njust been filled with ones.  Reaching that requires a scalable-mode PASID\nconfiguration on 32-bit x86, which is not a realistic deployment, but the\nconstruct is wrong regardless.\n\nCompute the mask with BIT_ULL() so that it is 64-bit on every\narchitecture, and skip the alignment check for a full flush, where it is\nboth meaningless and the source of the out-of-range shift.\n\nNote that @size_order must not be clamped below 64 - VTD_PAGE_SHIFT.  With\nS set, hardware derives the invalidation range from the least significant\nzero bit N of ADDR and matches bits [63:N+1] of the incoming address.  For\nsize_order 52 the descriptor sets ADDR[63:12] and clears bit 63, making\nN = 63 and the comparison range empty, so everything is invalidated.\nReducing @size_order to 51 would instead leave N = 62 and cause hardware\nto compare address bit 63; since callers pass an address of 0, only the\nlower half of the address space would be invalidated.  Bound @size_order\nat 64 - VTD_PAGE_SHIFT so that a bogus caller cannot reintroduce an\nout-of-range shift, without altering the full-flush encoding.\n\nThe non-PASID variant qi_desc_dev_iotlb() already uses 1ULL and is\nunaffected.","Type":"Description","Title":"iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid("}]}}}