Skip to content

[ciqlts9_2] Multiple patches tested (2 commits)#1408

Merged
PlaidCat merged 2 commits into
ciqlts9_2from
{shreeya_januscape}_ciqlts9_2
Jul 6, 2026
Merged

[ciqlts9_2] Multiple patches tested (2 commits)#1408
PlaidCat merged 2 commits into
ciqlts9_2from
{shreeya_januscape}_ciqlts9_2

Conversation

@ciq-kernel-automation

@ciq-kernel-automation ciq-kernel-automation Bot commented Jul 6, 2026

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

KVM: x86: Fix shadow paging use-after-free due to unexpected GFN

jira VULN-186744
cve CVE-2026-46113
commit-author Sean Christopherson <seanjc@google.com>
commit 0cb2af2ea66ad8ff195c156ea690f11216285bdf
upstream-diff |
	Two adaptations were required for this tree:
	1. spte_to_child_sp() does not exist here. Applying the upstream fix
	   verbatim failed to build ("implicit declaration of function
	   'spte_to_child_sp'", -Werror). That helper was introduced upstream
	   by 285f646e05b0 ("KVM: x86/mmu: Add helper to convert SPTE value to
	   its shadow page"), an unrelated helper-relocation refactor that does
	   not apply cleanly here; rather than pull it in, the call is written
	   using this tree's existing equivalent. spte_to_child_sp(x) is
	   defined upstream as to_shadow_page(x & SPTE_BASE_ADDR_MASK), which
	   this tree already uses verbatim, so the substitution is functionally
	   identical.
	2. The upstream commit deletes drop_large_spte(), converting its sole
	   caller to mmu_page_zap_pte() in __link_shadow_page(). This tree's
	   drop_large_spte() differs cosmetically (WARN_ON /
	   kvm_flush_remote_tlbs_with_address() vs the later WARN_ON_ONCE /
	   kvm_flush_remote_tlbs_sptep() forms), so the deletion hunk did not
	   apply automatically; the function is removed by hand. The caller
	   conversion applied cleanly and no other references remain.
	No functional difference from upstream.
KVM: x86: Fix shadow paging use-after-free due to unexpected role

jira VULN-191428
cve CVE-2026-53359
commit-author Paolo Bonzini <pbonzini@redhat.com>
commit 81ccda30b4e83d8f5cc4fd50503c44e3a33abfeb
upstream-diff |
	spte_to_child_sp() does not exist in this tree; the upstream
	condition spte_to_child_sp(*sptep) is written using this tree's
	equivalent to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK). See the
	prerequisite "unexpected GFN" commit for the full rationale.
	Functionally identical to upstream.

Reproducing and testing Januscape

Prerequisites

  1. A bare-metal host running LTS 9.2 without the two fixes (GFN + role).
  2. A guest VM (also LTS 9.2, or any kernel, the guest kernel is not what matters).
  3. Nested virtualization enabled on the host (kvm_intel nested=1), and the guest CPU set to host-passthrough so it can run the PoC's nested VMX/EPT workload.

Steps (inside the guest)

  1. Copy poc.c and Makefile into the guest.
  2. Build the module:
    make
  3. Load it (unload the guest's kvm_intel first for a clean slate):
    sudo rmmod kvm_intel
    sudo insmod poc.ko
  4. The PoC pins CPU and races the host's page-fault handler. A single insmod does not always win the race - it may crash on the first run, or take several.
  5. If it doesn't crash, unload and retry:
    sudo rmmod poc
    sudo insmod poc.ko
  6. Repeat. On an unpatched host you should see a crash within ~10 runs (a fresh insmod re-primes the race window each time).

Expected result

The host panics with a KVM shadow-MMU rmap corruption, with a signature like:

gfn mismatch under direct page <A> (expected <B>, got <C>)
pte_list_remove: <ptr> 0->BUG          # el9 / 5.14: pte_list_remove, mmu.c:940
kernel BUG at arch/x86/kvm/mmu/mmu.c:940!
RIP: pte_list_remove+... [kvm]
Call Trace: kvm_mmu_page_fault → mmu_set_spte → ... [kvm]
Comm: CPU N/KVM

Verifying the fix

Install the patched kernel on the host, boot into it, and repeat the same PoC runs from the guest. With the fix applied the host survives all runs (no pte_list_remove)

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 24m 39s 25m 36s
aarch64 12m 34s 13m 7s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 174 24 ciqlts9_2 ✅ No regressions
aarch64 140 28 ciqlts9_2 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1439 81 ciqlts9_2 ✅ No regressions
aarch64 1408 84 ciqlts9_2 ❌ 1 regressions

aarch64 regressions:

  • fcntl14_64 (PASS -> FAIL)

🤖 This PR was automatically generated by GitHub Actions
Run ID: 28801071493

sean-jc and others added 2 commits July 6, 2026 14:56
jira VULN-186744
cve CVE-2026-46113
commit-author Sean Christopherson <seanjc@google.com>
commit 0cb2af2
upstream-diff |
	Two adaptations were required for this tree:
	1. spte_to_child_sp() does not exist here. Applying the upstream fix
	   verbatim failed to build ("implicit declaration of function
	   'spte_to_child_sp'", -Werror). That helper was introduced upstream
	   by 285f646 ("KVM: x86/mmu: Add helper to convert SPTE value to
	   its shadow page"), an unrelated helper-relocation refactor that does
	   not apply cleanly here; rather than pull it in, the call is written
	   using this tree's existing equivalent. spte_to_child_sp(x) is
	   defined upstream as to_shadow_page(x & SPTE_BASE_ADDR_MASK), which
	   this tree already uses verbatim, so the substitution is functionally
	   identical.
	2. The upstream commit deletes drop_large_spte(), converting its sole
	   caller to mmu_page_zap_pte() in __link_shadow_page(). This tree's
	   drop_large_spte() differs cosmetically (WARN_ON /
	   kvm_flush_remote_tlbs_with_address() vs the later WARN_ON_ONCE /
	   kvm_flush_remote_tlbs_sptep() forms), so the deletion hunk did not
	   apply automatically; the function is removed by hand. The caller
	   conversion applied cleanly and no other references remain.
	No functional difference from upstream.

The shadow MMU computes GFNs for direct shadow pages using sp->gfn plus
the SPTE index. This assumption breaks for shadow paging if the guest
page tables are modified between VM entries (similar to commit
aad885e, "KVM: x86/mmu: Drop/zap existing present SPTE even
when creating an MMIO SPTE", 2026-03-27).  The flow is as follows:

- a PDE is installed for a 2MB mapping, and a page in that area is
  accessed.  KVM creates a kvm_mmu_page consisting of 512 4KB pages;
  the kvm_mmu_page is marked by FNAME(fetch) as direct-mapped because
  the guest's mapping is a huge page (and thus contiguous).

- the PDE mapping is changed from outside the guest.

- the guest accesses another page in the same 2MB area.  KVM installs
  a new leaf SPTE and rmap entry; the SPTE uses the "correct" GFN
  (i.e. based on the new mapping, as changed in the previous step) but
  that GFN is outside of the [sp->gfn, sp->gfn + 511] range; therefore
  the rmap entry cannot be found and removed when the kvm_mmu_page
  is zapped.

- the memslot that covers the first 2MB mapping is deleted, and the
  kvm_mmu_page for the now-invalid GPA is zapped.  However, rmap_remove()
  only looks at the [sp->gfn, sp->gfn + 511] range established in step 1,
  and fails to find the rmap entry that was recorded by step 3.

- any operation that causes an rmap walk for the same page accessed
  by step 3 then walks a stale rmap and dereferences a freed kvm_mmu_page.
  This includes dirty logging or MMU notifier invalidations (e.g., from
  MADV_DONTNEED).

The underlying issue is that KVM's walking of shadow PTEs assumes that
if a SPTE is present when KVM wants to install a non-leaf SPTE, then the
existing kvm_mmu_page must be for the correct gfn.  Because the only way
for the gfn to be wrong is if KVM messed up and failed to zap a SPTE...
which shouldn't happen, but *actually* only happens in response to a
guest write.

That bug dates back literally forever, as even the first version of KVM
assumes that the GFN matches and walks into the "wrong" shadow page.
However, that was only an imprecision until 2032a93 ("KVM: MMU:
Don't allocate gfns page for direct mmu pages") came along.

Fix it by checking for a target gfn mismatch and zapping the existing
SPTE.  That way the old SP and rmap entries are gone, KVM installs
the rmap in the right location, and everyone is happy.

Fixes: 2032a93 ("KVM: MMU: Don't allocate gfns page for direct mmu pages")
Fixes: 6aa8b73 ("kvm: userspace interface")
Reported-by: Alexander Bulekov <bkov@amazon.com>
Reported-by: Fred Griffoul <fgriffo@amazon.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://patch.msgid.link/20260503201029.106481-1-pbonzini@redhat.com/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 0cb2af2)
Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-191428
cve CVE-2026-53359
commit-author Paolo Bonzini <pbonzini@redhat.com>
commit 81ccda3
upstream-diff |
	spte_to_child_sp() does not exist in this tree; the upstream
	condition spte_to_child_sp(*sptep) is written using this tree's
	equivalent to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK). See the
	prerequisite "unexpected GFN" commit for the full rationale.
	Functionally identical to upstream.

Commit 0cb2af2 ("KVM: x86: Fix shadow paging use-after-free due
to unexpected GFN") fixed a shadow paging mismatch between stored and
computed GFNs; the bug could be triggered by changing a PDE mapping from
outside the guest, and then deleting a memslot.  The rmap_remove()
call would miss entries created after the PDE change because the GFN
of the leaf SPTE does not match the GFN of the struct kvm_mmu_page.

A similar hole however remains if the modified PDE points to a non-leaf
page.  In this case the gfn can be made to match, but the role does not
match: the original large 2MB page creates a kvm_mmu_page with direct=1,
while the new 4KB needs a kvm_mmu_page with direct=0.  However,
kvm_mmu_get_child_sp() does not compare the role, and therefore reuses
the page.

The next step is installing a leaf (4KB) SPTE on the new path which
records an rmap entry under the gfn resolved by the walk.  But when
that child is zapped its parent kvm_mmu_page has direct=1 and
kvm_mmu_page_get_gfn() computes the gfn for the 4KB page as
sp->gfn + index instead of using sp->shadowed_translation[] (or sp->gfns[]
in older kernels).  It therefore fails to remove the recorded entry.

When the memslot is dropped the shadow page is freed but the rmap
entry survives, as in the scenario that was already fixed.  Code that
later walks that gfn (dirty logging, MMU notifier invalidation, and
so on) dereferences an sptep that lies in the freed page, causing the
use-after-free.

Fixes: 2032a93 ("KVM: MMU: Don't allocate gfns page for direct mmu pages")
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 81ccda3)
Signed-off-by: Shreeya Patel <spatel@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/28817353824

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit f6b15e797e4 (KVM: x86: Fix shadow paging use-after-free due to unexpected GFN) → upstream 0cb2af2ea66a
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1148,6 +1148,20 @@
 		rmap_remove(kvm, sptep);
 }
 
+static void drop_large_spte(struct kvm *kvm, u64 *sptep, bool flush)
+{
+	struct kvm_mmu_page *sp;
+
+	sp = sptep_to_sp(sptep);
+	WARN_ON(sp->role.level == PG_LEVEL_4K);
+
+	drop_spte(kvm, sptep);
+
+	if (flush)
+		kvm_flush_remote_tlbs_with_address(kvm, sp->gfn,
+			KVM_PAGES_PER_HPAGE(sp->role.level));
+}
+
 /*
  * Write-protect on the specified @sptep, @pt_protect indicates whether
  * spte write-protection is caused by protecting shadow page table.
@@ -2220,7 +2234,7 @@
 	union kvm_mmu_page_role role;
 
 	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
+	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1289,19 +1291,6 @@
 		rmap_remove(kvm, sptep);
 }
 
-static void drop_large_spte(struct kvm *kvm, u64 *sptep, bool flush)
-{
-	struct kvm_mmu_page *sp;
-
-	sp = sptep_to_sp(sptep);
-	WARN_ON_ONCE(sp->role.level == PG_LEVEL_4K);
-
-	drop_spte(kvm, sptep);
-
-	if (flush)
-		kvm_flush_remote_tlbs_sptep(kvm, sptep);
-}
-
 /*
  * Write-protect on the specified @sptep, @pt_protect indicates whether
  * spte write-protection is caused by protecting shadow page table.

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1151,13 +1292,12 @@
 	struct kvm_mmu_page *sp;
 
 	sp = sptep_to_sp(sptep);
-	WARN_ON(sp->role.level == PG_LEVEL_4K);
+	WARN_ON_ONCE(sp->role.level == PG_LEVEL_4K);
 
 	drop_spte(kvm, sptep);
 
 	if (flush)
-		kvm_flush_remote_tlbs_with_address(kvm, sp->gfn,
-			KVM_PAGES_PER_HPAGE(sp->role.level));
+		kvm_flush_remote_tlbs_sptep(kvm, sptep);
 }
 
 /*
  • ⚠️ PR commit c9fe36bd6f8 (KVM: x86: Fix shadow paging use-after-free due to unexpected role) → upstream 81ccda30b4e8
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2219,11 +2219,8 @@
 {
 	union kvm_mmu_page_role role = kvm_mmu_child_role(sptep, direct, access);
 
-	if (is_shadow_present_pte(*sptep) &&
-	    !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->role.word == role.word)
+	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
+	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	return kvm_mmu_get_shadow_page(vcpu, gfn, role);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2461,8 +2461,11 @@
 {
 	union kvm_mmu_page_role role;
 
-	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
+	if (is_shadow_present_pte(*sptep) &&
+	    !is_large_pte(*sptep) &&
+	    spte_to_child_sp(*sptep) &&
+	    spte_to_child_sp(*sptep)->gfn == gfn &&
+	    spte_to_child_sp(*sptep)->role.word == role.word)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2217,7 +2217,7 @@
 	union kvm_mmu_page_role role;
 
 	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
+	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

This is an automated interdiff check for backported commits.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

JIRA PR Check Results

2 commit(s) with issues found:

Commit c9fe36bd6f8d

Summary: KVM: x86: Fix shadow paging use-after-free due to unexpected role

❌ Errors:

  • VULN-191428: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-191428: No time logged - please log time manually

Commit f6b15e797e40

Summary: KVM: x86: Fix shadow paging use-after-free due to unexpected GFN

❌ Errors:

  • VULN-186744: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-186744: No time logged - please log time manually

Summary: Checked 2 commit(s) total.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/28817353824

@bmastbergen bmastbergen self-requested a review July 6, 2026 20:38

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@PlaidCat PlaidCat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@PlaidCat PlaidCat merged commit f9047a0 into ciqlts9_2 Jul 6, 2026
6 checks passed
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/28822279125

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit f6b15e797e4 (KVM: x86: Fix shadow paging use-after-free due to unexpected GFN) → upstream 0cb2af2ea66a
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1148,6 +1148,20 @@
 		rmap_remove(kvm, sptep);
 }
 
+static void drop_large_spte(struct kvm *kvm, u64 *sptep, bool flush)
+{
+	struct kvm_mmu_page *sp;
+
+	sp = sptep_to_sp(sptep);
+	WARN_ON(sp->role.level == PG_LEVEL_4K);
+
+	drop_spte(kvm, sptep);
+
+	if (flush)
+		kvm_flush_remote_tlbs_with_address(kvm, sp->gfn,
+			KVM_PAGES_PER_HPAGE(sp->role.level));
+}
+
 /*
  * Write-protect on the specified @sptep, @pt_protect indicates whether
  * spte write-protection is caused by protecting shadow page table.
@@ -2220,7 +2234,7 @@
 	union kvm_mmu_page_role role;
 
 	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
+	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1289,19 +1291,6 @@
 		rmap_remove(kvm, sptep);
 }
 
-static void drop_large_spte(struct kvm *kvm, u64 *sptep, bool flush)
-{
-	struct kvm_mmu_page *sp;
-
-	sp = sptep_to_sp(sptep);
-	WARN_ON_ONCE(sp->role.level == PG_LEVEL_4K);
-
-	drop_spte(kvm, sptep);
-
-	if (flush)
-		kvm_flush_remote_tlbs_sptep(kvm, sptep);
-}
-
 /*
  * Write-protect on the specified @sptep, @pt_protect indicates whether
  * spte write-protection is caused by protecting shadow page table.

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1151,13 +1292,12 @@
 	struct kvm_mmu_page *sp;
 
 	sp = sptep_to_sp(sptep);
-	WARN_ON(sp->role.level == PG_LEVEL_4K);
+	WARN_ON_ONCE(sp->role.level == PG_LEVEL_4K);
 
 	drop_spte(kvm, sptep);
 
 	if (flush)
-		kvm_flush_remote_tlbs_with_address(kvm, sp->gfn,
-			KVM_PAGES_PER_HPAGE(sp->role.level));
+		kvm_flush_remote_tlbs_sptep(kvm, sptep);
 }
 
 /*
  • ⚠️ PR commit c9fe36bd6f8 (KVM: x86: Fix shadow paging use-after-free due to unexpected role) → upstream 81ccda30b4e8
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2219,11 +2219,8 @@
 {
 	union kvm_mmu_page_role role = kvm_mmu_child_role(sptep, direct, access);
 
-	if (is_shadow_present_pte(*sptep) &&
-	    !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->role.word == role.word)
+	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
+	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	return kvm_mmu_get_shadow_page(vcpu, gfn, role);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2461,8 +2461,11 @@
 {
 	union kvm_mmu_page_role role;
 
-	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
+	if (is_shadow_present_pte(*sptep) &&
+	    !is_large_pte(*sptep) &&
+	    spte_to_child_sp(*sptep) &&
+	    spte_to_child_sp(*sptep)->gfn == gfn &&
+	    spte_to_child_sp(*sptep)->role.word == role.word)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2217,7 +2217,7 @@
 	union kvm_mmu_page_role role;
 
 	if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep) &&
-	    to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK) && to_shadow_page(*sptep & SPTE_BASE_ADDR_MASK)->gfn == gfn)
+	    spte_to_child_sp(*sptep) && spte_to_child_sp(*sptep)->gfn == gfn)
 		return ERR_PTR(-EEXIST);
 
 	role = kvm_mmu_child_role(sptep, direct, access);

This is an automated interdiff check for backported commits.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

JIRA PR Check Results

95 commit(s) with issues found:

Commit ce60197d73b1

Summary: sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL

❌ Errors:

  • VULN-186967: Status is 'Publish CSAF', expected 'In Progress'

Commit bfa5a2d02a27

Summary: netfilter: ip6t_eui64: reject invalid MAC header for all packets

❌ Errors:

  • VULN-183036: Status is 'Publish CSAF', expected 'In Progress'

Commit 3fbb1898aa3a

Summary: netfilter: nf_conntrack_h323: check for zero length in DecodeQ931()

❌ Errors:

  • VULN-179956: Status is 'Publish CSAF', expected 'In Progress'

Commit 697cf76a56ac

Summary: smb: client: validate dacloffset before building DACL pointers

❌ Errors:

  • VULN-188328: Status is 'Publish CSAF', expected 'In Progress'

Commit 3dcb4c8ae02a

Summary: smb: client: use kzalloc to zero-initialize security descriptor buffer

❌ Errors:

  • VULN-188853: Status is 'Publish CSAF', expected 'In Progress'

Commit 9b5bf4c79714

Summary: smb: client: require a full NFS mode SID before reading mode bits

❌ Errors:

  • VULN-184957: Status is 'Publish CSAF', expected 'In Progress'

Commit e5759cab491e

Summary: smb: client: validate the whole DACL before rewriting it in cifsacl

❌ Errors:

  • VULN-183468: Status is 'Publish CSAF', expected 'In Progress'

Commit fbd4c57aa7f7

Summary: net: bonding: fix use-after-free in bond_xmit_broadcast()

❌ Errors:

  • VULN-181412: Status is 'Publish CSAF', expected 'In Progress'

Commit e54d1c894e57

Summary: mlxsw: spectrum_acl_tcam: Fix memory leak when canceling rehash work

❌ Errors:

  • VULN-43023: Status is 'Done', expected 'In Progress'

Commit b29db2315e70

Summary: scsi: qedi: Fix crash while reading debugfs attribute

❌ Errors:

  • VULN-43643: Status is 'Done', expected 'In Progress'

Commit 8cee09e84aab

Summary: icmp: prevent possible NULL dereferences from icmp_build_probe()

❌ Errors:

  • VULN-43056: Status is 'Done', expected 'In Progress'

Commit 47dbb184b358

Summary: wifi: nl80211: don't free NULL coalescing rule

❌ Errors:

  • VULN-5407: Status is 'Done', expected 'In Progress'

Commit 8d605080169a

Summary: cpufreq: cppc: Fix invalid return value in .get() callback

❌ Errors:

  • VULN-5484: Status is 'Done', expected 'In Progress'

Commit a0837db260c7

Summary: cppc_cpufreq: Fix possible null pointer dereference

❌ Errors:

  • VULN-5484: Status is 'Done', expected 'In Progress'

Commit 8d505f70deb0

Summary: nouveau: fix instmem race condition around ptr stores

❌ Errors:

  • VULN-37531: Status is 'Done', expected 'In Progress'

Commit f7bbca5ca218

Summary: cpufreq: exit() callback is optional

❌ Errors:

  • VULN-5516: Status is 'Done', expected 'In Progress'

Commit 7ea25aab559b

Summary: fs: sysfs: Fix reference leak in sysfs_break_active_protection()

❌ Errors:

  • VULN-980: Status is 'Done', expected 'In Progress'

Commit c51650a0234c

Summary: net/sched: fix pedit partial COW leading to page cache corruption

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit ec9c089eaffe

Summary: net/sched: act_pedit: fix action bind logic

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 4c89bf4561d2

Summary: net/sched: act_pedit: free pedit keys on bail from offset check

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 252b645b8c80

Summary: net/sched: act_pedit: Parse L3 Header for L4 offset

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit af8e7cd908af

Summary: net/sched: act_pedit: rate limit datapath messages

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 13a76adee480

Summary: net/sched: act_pedit: check static offsets a priori

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 355e136853ba

Summary: net/sched: act_pedit: remove extra check for key type

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 2d57f0d98d7d

Summary: net/sched: simplify tcf_pedit_act

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit f8ca956b9bfc

Summary: net/sched: transition act_pedit to rcu and percpu stats

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 708f78705192

Summary: net/sched: act_pedit: use NLA_POLICY for parsing 'ex' keys

❌ Errors:

  • VULN-188480: Status is 'Done', expected 'In Progress'

Commit 17e4221ec8cd

Summary: xfs: fix freemap adjustments when adding xattrs to leaf blocks

❌ Errors:

  • VULN-184487: Status is 'Done', expected 'In Progress'

Commit 56287881216b

Summary: netfilter: xt_tcpmss: check remaining length before reading optlen

❌ Errors:

  • VULN-184557: Status is 'Done', expected 'In Progress'

Commit 7a369672ab5c

Summary: scsi: target: iscsi: Fix use-after-free in iscsit_dec_conn_usage_count()

❌ Errors:

  • VULN-176436: Status is 'Done', expected 'In Progress'

Commit 9700352f2e39

Summary: libceph: replace overzealous BUG_ON in osdmap_apply_incremental()

❌ Errors:

  • VULN-174788: Status is 'Done', expected 'In Progress'

Commit c352628d83a8

Summary: libceph: prevent potential out-of-bounds reads in handle_auth_done()

❌ Errors:

  • VULN-174768: Status is 'Done', expected 'In Progress'

Commit 4101a9e94b7b

Summary: libceph: make decode_pool() more resilient against corrupted osdmaps

❌ Errors:

  • VULN-174158: Status is 'Done', expected 'In Progress'

Commit ef62387f6327

Summary: nbd: defer config unlock in nbd_genl_connect

❌ Errors:

  • VULN-171934: Status is 'Done', expected 'In Progress'

Commit a2cd3ad62472

Summary: crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id

❌ Errors:

  • VULN-171986: Status is 'Done', expected 'In Progress'

Commit 40824e754172

Summary: KVM: x86/mmu: Drop/zap existing present SPTE even when creating an MMIO SPTE

❌ Errors:

  • VULN-180395: Status is 'Done', expected 'In Progress'

Commit 4f58c44b1233

Summary: netfilter: flowtable: account for Ethernet header in nf_flow_pppoe_proto()

❌ Errors:

  • VULN-80080: Status is 'Done', expected 'In Progress'

Commit d1c86e1ab4c5

Summary: netfilter: flowtable: validate pppoe header

❌ Errors:

  • VULN-37637: Status is 'Done', expected 'In Progress'

Commit a9e34de62a49

Summary: netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()

❌ Errors:

  • VULN-4970: Status is 'Done', expected 'In Progress'

Commit 66f0b1cf5fde

Summary: net: ena: Fix incorrect descriptor free behavior

❌ Errors:

  • VULN-38028: Status is 'Done', expected 'In Progress'

Commit 0885c2e931e0

Summary: net/mlx5: Properly link new fs rules into the tree

❌ Errors:

  • VULN-3105: Status is 'Done', expected 'In Progress'

Commit 71a293491ce9

Summary: ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr

❌ Errors:

  • VULN-38062: Status is 'Done', expected 'In Progress'

Commit b0afb2f12d5e

Summary: drm/client: Fully protect modes[] with dev->mode_config.mutex

❌ Errors:

  • VULN-38014: Status is 'Done', expected 'In Progress'

Commit b8049dfbb51e

Summary: scsi: qla2xxx: Fix off by one in qla_edif_app_getstats()

❌ Errors:

  • VULN-5287: Status is 'Done', expected 'In Progress'

Commit f31d0e9627a0

Summary: netfilter: nf_tables: Fix potential data-race in __nft_flowtable_type_get()

❌ Errors:

  • VULN-37860: Status is 'Done', expected 'In Progress'

Commit cf9f720a1efd

Summary: mlxbf_gige: stop interface during shutdown

❌ Errors:

  • VULN-37795: Status is 'Done', expected 'In Progress'

Commit 9aae3b357b6f

Summary: net: fix memory leak in skb_segment_list for GRO packets

❌ Errors:

  • VULN-174746: Status is 'Done', expected 'In Progress'

Commit 0c11c3e1f7c5

Summary: gro: fix ownership transfer

❌ Errors:

  • VULN-37821: Status is 'Done', expected 'In Progress'

Commit 2070c918f8d9

Summary: xen-netfront: Add missing skb_mark_for_recycle

❌ Errors:

  • VULN-3103: Status is 'Done', expected 'In Progress'

Commit d94d699255cf

Summary: i40e: fix vf may be used uninitialized in this function warning

❌ Errors:

  • VULN-5279: Status is 'Done', expected 'In Progress'

Commit 9852fe174c0c

Summary: scsi: mpi3mr: Avoid memcpy field-spanning write WARNING

❌ Errors:

  • VULN-47431: Status is 'Done', expected 'In Progress'

Commit 49a166fdbc5d

Summary: wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes

❌ Errors:

  • VULN-47154: Status is 'Done', expected 'In Progress'

Commit 32c4e875cda8

Summary: kprobes/x86: Use copy_from_kernel_nofault() to read from unsafe address

❌ Errors:

  • VULN-37443: Status is 'Done', expected 'In Progress'

Commit d38622996959

Summary: arm64: errata: Mitigate TLBI errata on Microsoft Azure Cobalt 100 CPU

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit fb7b641c2421

Summary: arm64: errata: Mitigate TLBI errata on NVIDIA Olympus CPU

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 72fbbaf2fb1a

Summary: arm64: errata: Mitigate TLBI errata on various Arm CPUs

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit b9b315ad55fd

Summary: arm64: cputype: Add C1-Premium definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 61af6a9fbdb3

Summary: arm64: cputype: Add C1-Ultra definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit b08eac74804c

Summary: arm64: cputype: Add NVIDIA Olympus definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit dc80cb350d7b

Summary: arm64: cputype: Add C1-Pro definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit faa19e6bfb7d

Summary: arm64: cputype: Add Neoverse-V3AE definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 8544ec262d7a

Summary: arm64: cputype: Add Neoverse-N3 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 05a06ade0aeb

Summary: arm64: cputype: Add Cortex-A720AE definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 30b48bb5f465

Summary: arm64: cputype: Add Cortex-A725 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 60e8f4c54dbd

Summary: arm64: Subscribe Microsoft Azure Cobalt 100 to ARM Neoverse N2 errata

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit f85162db395b

Summary: arm64: cputype: Add Cortex-X925 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit c58354e931b5

Summary: arm64: cputype: Add Neoverse-V3 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 87c99755c42b

Summary: arm64: cputype: Add Cortex-X4 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 4fa650214be6

Summary: arm64: cputype: Add Cortex-A720 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit c1cfc9b452e0

Summary: arm64: Add Neoverse-V2 part

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 4eb4a74799ce

Summary: arm64: cputype: Add Cortex-X3 definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 958889b256ba

Summary: arm64: cputype: Add Cortex-X1C definitions

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit f807da37bfba

Summary: arm64: cputype: Add MIDR_CORTEX_A76AE

❌ Errors:

  • VULN-187521: Status is 'Done', expected 'In Progress'

Commit 982a49d9ebf6

Summary: ip6_tunnel: clear skb2->cb[] in ip4ip6_err()

❌ Errors:

  • VULN-183731: Status is 'Done', expected 'In Progress'

Commit f01206a4a971

Summary: ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()

❌ Errors:

  • VULN-183737: Status is 'Done', expected 'In Progress'

Commit 02aa6f4153fb

Summary: net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop

❌ Errors:

  • VULN-187517: Status is 'Done', expected 'In Progress'

Commit 195e5dc6b012

Summary: net/sched: Make cake_enqueue return NET_XMIT_CN when past buffer_limit

❌ Errors:

  • VULN-152970: Status is 'Done', expected 'In Progress'

Commit 40080203cd45

Summary: net: sched: fix ordering of qlen adjustment

❌ Errors:

  • VULN-46603: Status is 'Done', expected 'In Progress'

Commit 697905776c09

Summary: netfilter: nf_tables: fix inverted genmask check in nft_map_catchall_activate()

❌ Errors:

  • VULN-176072: Status is 'Done', expected 'In Progress'

Commit 435af4f1f4b6

Summary: netfilter: nf_tables: do not compare internal table flags on updates

❌ Errors:

  • VULN-4986: Status is 'Done', expected 'In Progress'

Commit 2d2b563a476d

Summary: octeontx2-af: Use separate handlers for interrupts

❌ Errors:

  • VULN-37687: Status is 'Done', expected 'In Progress'

Commit 60e898ba4825

Summary: dm: call the resume method on internal suspend

❌ Errors:

  • VULN-37132: Status is 'Done', expected 'In Progress'

Commit e0047cb8c74d

Summary: nfp: flower: handle acti_netdevs allocation failure

❌ Errors:

  • VULN-37723: Status is 'Done', expected 'In Progress'

Commit 831028cb3487

Summary: scsi: lpfc: Move NPIV's transport unregistration to after resource clean up

❌ Errors:

  • VULN-47578: Status is 'Done', expected 'In Progress'

Commit 31bc7323ed64

Summary: scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()

❌ Errors:

  • VULN-47487: Status is 'Done', expected 'In Progress'

Commit 15016e4ce174

Summary: scsi: qla2xxx: Fix command flush on cable pull

❌ Errors:

  • VULN-37382: Status is 'Done', expected 'In Progress'

Commit 034be15ae09f

Summary: netfilter: nf_tables: disallow anonymous set with timeout flag

❌ Errors:

  • VULN-828: Status is 'Done', expected 'In Progress'

Commit 84c48b17c96d

Summary: nfsd: fix heap overflow in NFSv4.0 LOCK replay cache

❌ Errors:

  • VULN-180163: Status is 'Done', expected 'In Progress'

Commit 15f65a192965

Summary: NFSD: Fix crash in nfsd4_read_release()

❌ Errors:

  • VULN-161290: Status is 'Done', expected 'In Progress'

Commit f2244de83ca4

Summary: nfsd: call op_release, even when op_func returns an error

❌ Errors:

  • VULN-154845: Status is 'Done', expected 'In Progress'

Commit 9a55104d838a

Summary: can: raw: fix ro->uniq use-after-free in raw_rcv()

❌ Errors:

  • VULN-182364: Status is 'Done', expected 'In Progress'

Commit 66fce69467df

Summary: RDMA/umad: Reject negative data_len in ib_umad_write

❌ Errors:

  • VULN-178540: Status is 'Done', expected 'In Progress'

Commit e3f5fbc0e1ae

Summary: blk-mq: fix IO hang from sbitmap wakeup race

❌ Errors:

  • VULN-860: Status is 'Done', expected 'In Progress'

Commit 753361483fd7

Summary: PM / devfreq: Synchronize devfreq_monitor_[start/stop]

❌ Errors:

  • VULN-35274: Status is 'Done', expected 'In Progress'

Commit d31ec9714663

Summary: wifi: ath10k: fix NULL pointer dereference in ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev()

❌ Errors:

  • VULN-35352: Status is 'Done', expected 'In Progress'

Summary: Checked 100 commit(s) total.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/28822279125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

4 participants