Fix null pointer deref crash when no OEM filesystem label is specified#25
Merged
pothos merged 1 commit intoflatcar-masterfrom Aug 25, 2021
Merged
Fix null pointer deref crash when no OEM filesystem label is specified#25pothos merged 1 commit intoflatcar-masterfrom
pothos merged 1 commit intoflatcar-masterfrom
Conversation
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Aug 19, 2021
jepio
reviewed
Aug 20, 2021
The check for reusing a filesystem didn't cover the case where no filesystem label was specified for the OEM partition, causing a crash. Instead of handling the missing filesystem labels in the check when an existing OEM partition is checked for reuse, we relax the conditions for reuse of the OEM partition and will always reuse it unless a mismatching FS label or UUID got specified by the user (and the user doesn't force a wipe).
f50a2cc to
0a5340e
Compare
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Aug 25, 2021
jepio
approved these changes
Aug 25, 2021
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Aug 25, 2021
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Aug 25, 2021
t-lo
pushed a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The check for reusing a filesystem didn't cover the case where no
filesystem label was specified for the OEM partition, causing a crash.
Instead of handling the missing filesystem labels in the check when an
existing OEM partition is checked for reuse, we relax the conditions
for reuse of the OEM partition and will always reuse it unless a
mismatching FS label or UUID got specified by the user (and the user
doesn't force a wipe).
How to use
Test that a CLC with
which is missing the label
label: OEMdoes not crash the system but reuses the existing OEM partition to write to the file.With
ext4there is a mismatch and the system is expected to reuse the partition, too, and not enter a bootloop.Testing done
Tested these three cases: