readline: add patch to fix crash when readline is started with an invalid locale specification#12903
Merged
christopherco merged 1 commit into3.0-devfrom Mar 18, 2025
Merged
Conversation
christopherco
requested changes
Mar 15, 2025
Collaborator
christopherco
left a comment
There was a problem hiding this comment.
Please retarget to 3.0-dev
…alid locale specification Signed-off-by: Thien Trung Vuong <tvuong@microsoft.com>
40051a5 to
f654c2e
Compare
christopherco
approved these changes
Mar 18, 2025
SumitJenaHCL
pushed a commit
to SumitJenaHCL/azurelinux
that referenced
this pull request
Aug 20, 2025
…alid locale specification (microsoft#12903) readline 8.2 would crash when _rl_init_locale is called with an invalid locale specification (e.g locale not available in the system). This causes a problem in initramfs emergency shell because it was not packaged with the preferred locale (C.UTF-8), thus bash will crash and no emergency shell is available. This issue does not affect Mariner 2 as it is using readline 8.1, and the bug seems to be introduced by version 8.2. Backport patch to address readline 8.2 crash when started with an invalid locale specification. Signed-off-by: Thien Trung Vuong <tvuong@microsoft.com>
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.
…alid locale specification
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
readline 8.2 would crash when
_rl_init_localeis called with an invalid locale specification (e.g locale not available in the system). This causes a problem in initramfs emergency shell because it was not packaged with the preferred locale (C.UTF-8), thus bash will crash and no emergency shell is available. This issue does not affect Mariner 2 as it is using readline 8.1, and the bug seems to be introduced by version 8.2.Change Log
Does this affect the toolchain?
YES
Associated issues
Test Methodology
Image built with readline 8.2 including the patch: https://dev.azure.com/mariner-org/mariner/_build/results?buildId=760522&view=results
rd.shell=1 rd.breakto kernel command linedracut --force --regenerate-all