-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRUB module loading corruption #374
Comments
d9c80bf is the commit that's affected (in case PR gets force pushed) |
Can you give a description of the problem ? |
This bug is definitely present on master. Haven't bisect yet, but reverting last xmas_elf update fixes the problem: 014dc18 (Jun 15 !) I would like to investigate and report the bug to xmas_elf, but in the mean time I'm going to make a PR doing the revert. |
This reverts commit 014dc18. Addressing sunriseos#374 xmas_elf does an out of bound access when loading vi, causing a kernel panic. Reverting the last update of xmas_elf seems to fix the problem, use this until we figure out where this bug comes from.
I was wrong, reverting xmas_elf update does no solve the problem. On some branches it seems to sometime disappear when doing a full rebuild of sunrise, hinting toward an incremental compilation problem. For now I still believe this is a xmas_elf bug, and sunrise is not responsible for it. To prove my theory I'm going to try to replicate the OOB in a std crate that just tries to parse the "faulty" vi elf with xmas_elf. |
@Thog found the problem: it's in mkiso-rs. Once the bug is found, we should add a test to the CI that the generated ISO is correct by mounting the ISO and checking all the files. EDIT: Such a test would not actually have found the problem, since the ISO filesystem seems to be OK. The El Torrito is apparently broken. |
GRUB2 seems to not like the way my files were allocated, this should be fixed by the last release of mkisofs-rs. Please make sure to update it. |
Updated mkisofs-rs, diffed every module loaded by grub against their original elf, everything seems to be in order now. I'm closing the issue. |
This memory corruption only occurs while loading vi and can be reproduced on PR #360 .
The text was updated successfully, but these errors were encountered: