Skip to content

Commit 37d9118

Browse files
committed
Verify kernel module
Apply relocations to elf data and verify match to module in memory
1 parent bf472de commit 37d9118

File tree

6 files changed

+640
-15
lines changed

6 files changed

+640
-15
lines changed

Cargo.lock

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

litebox_platform_lvbs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ num_enum = { version = "0.7.3", default-features = false }
2525
once_cell = { version = "1.20.2", default-features = false, features = ["alloc", "race"] }
2626
modular-bitfield = { version = "0.12.0", default-features = false }
2727
hashbrown = "0.15.2"
28-
elf = { version = "0.7.4", default-features = false }
28+
elf = { version = "0.8.0", default-features = false }
2929
cms = { version = "0.2.3", default-features = false, features = ["alloc"] }
3030
rsa = { version = "0.9.8", default-features = false }
3131
sha1 = { version = "0.10.6", default-features = false, features = ["force-soft"] }

litebox_platform_lvbs/src/mshv/heki.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ pub enum HekiKexecType {
6262
#[default]
6363
Unknown = 0xffff_ffff_ffff_ffff,
6464
}
65-
66-
#[derive(Clone, Copy, Default, Debug, TryFromPrimitive, PartialEq)]
65+
#[derive(Clone, Copy, Default, Debug, TryFromPrimitive, PartialEq, Hash, Eq)]
6766
#[repr(u64)]
6867
pub enum ModMemType {
6968
Text = 0,
@@ -75,6 +74,8 @@ pub enum ModMemType {
7574
InitRoData = 6,
7675
ElfBuffer = 7,
7776
Patch = 8,
77+
Syms = 9,
78+
GplSyms = 10,
7879
#[default]
7980
Unknown = 0xffff_ffff_ffff_ffff,
8081
}

0 commit comments

Comments
 (0)