Skip to content

Harden LVBS/HEKI module/kexec validation against TOCTOU and confused deputy#1011

Merged
sangho2 merged 5 commits into
mainfrom
sanghle/lvbs/modval
Jul 17, 2026
Merged

Harden LVBS/HEKI module/kexec validation against TOCTOU and confused deputy#1011
sangho2 merged 5 commits into
mainfrom
sanghle/lvbs/modval

Conversation

@sangho2

@sangho2 sangho2 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This PR hardens LVBS/HEKI's module and kexec validation against TOCTOU and confused-deputy attacks. Currently, there is a time window which allows VTL0 (on another core) to tamper with validated module/kexec bytes before they turn into executable bytes, including direct modification and indirect modification through VTL1 (confused deputy). This PR eliminates this race condition by rejecting overlapped or already-protected page frames and freezing frames before copy/validation.

@sangho2 sangho2 changed the title Close TOCTOU in LVBS/HEKI module validation Fix TOCTOU in LVBS/HEKI module validation Jul 7, 2026
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 4 times, most recently from 0b150e2 to c09c768 Compare July 8, 2026 05:25
@sangho2 sangho2 changed the title Fix TOCTOU in LVBS/HEKI module validation Harden LVBS/HEKI module/kexec validation against TOCTOU Jul 8, 2026
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 4 times, most recently from a850ad1 to 392fd5a Compare July 8, 2026 22:49
@sangho2
sangho2 marked this pull request as ready for review July 8, 2026 22:51
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 2 times, most recently from 991ac2f to e1aa5f3 Compare July 11, 2026 03:27
@sangho2 sangho2 added the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label Jul 13, 2026
@sangho2 sangho2 changed the title Harden LVBS/HEKI module/kexec validation against TOCTOU Harden LVBS/HEKI module/kexec validation against TOCTOU and confused deputy Jul 13, 2026
@sangho2
sangho2 marked this pull request as draft July 13, 2026 17:40
@sangho2 sangho2 removed the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label Jul 13, 2026
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 3 times, most recently from d5efb4c to 2f40b72 Compare July 13, 2026 23:42
@sangho2
sangho2 marked this pull request as ready for review July 13, 2026 23:46
@sangho2 sangho2 added the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label Jul 14, 2026
@sangho2
sangho2 marked this pull request as draft July 14, 2026 15:07
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch from 2f40b72 to abcc741 Compare July 14, 2026 15:50
@sangho2 sangho2 removed the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label Jul 14, 2026
@sangho2
sangho2 marked this pull request as ready for review July 14, 2026 15:51
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 2 times, most recently from 303382a to d2ee660 Compare July 14, 2026 18:19

@wdcui wdcui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I left some comments below. I don't have a high confidence of my review. Should we have someone else to take a look at this PR as well?

Comment thread litebox_platform_lvbs/src/mshv/ringbuffer.rs
Comment thread litebox_platform_lvbs/src/lib.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch from 743ca33 to 629b3f5 Compare July 16, 2026 19:57
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch 2 times, most recently from a808c42 to 7f9455c Compare July 16, 2026 21:52

@wdcui wdcui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks.

@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch from 7f9455c to c1a1671 Compare July 17, 2026 16:50
@sangho2
sangho2 force-pushed the sanghle/lvbs/modval branch from c1a1671 to 47ff384 Compare July 17, 2026 17:05
@sangho2
sangho2 enabled auto-merge July 17, 2026 17:06
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

@sangho2
sangho2 added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 75b7151 Jul 17, 2026
14 checks passed
@sangho2
sangho2 deleted the sanghle/lvbs/modval branch July 17, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants