Skip to content

Commit 04c3bef

Browse files
committed
validate-bundle: read the page-offset window from its current path
guaranteed_sig built its signature from .layout.virt_page_offset_min and _max, fields the JSON does not emit -- the page-offset guaranteed window lives at .kaslr.memory_kaslr.virt_page_offset_base. Both resolved to null every run, so --perturb never covered movement of the page-offset window; only the text and phys fields it also reads were exercised. Read the window from its actual path so the signature includes it.
1 parent c7e3f9f commit 04c3bef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

extra/validate-bundle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ run_kasld_sysroot() {
218218
# or EMPTY (no window resolved) / PARSE-ERROR (bad JSON).
219219
guaranteed_sig() {
220220
jq -e . "$1" >/dev/null 2>&1 || { printf 'PARSE-ERROR\n'; return; }
221-
s=$(jq -r '(.layout // {})
222-
| [.virt_image_base_min, .virt_image_base_max,
223-
.phys_kaslr_text_min, .phys_kaslr_text_max,
224-
.virt_page_offset_min, .virt_page_offset_max]
221+
s=$(jq -r '[.layout.virt_image_base_min, .layout.virt_image_base_max,
222+
.layout.phys_kaslr_text_min, .layout.phys_kaslr_text_max,
223+
.kaslr.memory_kaslr.virt_page_offset_base.min,
224+
.kaslr.memory_kaslr.virt_page_offset_base.max]
225225
| map(if . == null then "." else tostring end) | join("|")' "$1")
226226
case "$s" in
227227
'.|.|.|.|.|.') printf 'EMPTY\n' ;;

0 commit comments

Comments
 (0)