Repository navigation
Conversation
The aarch64 gadget sent it to segfault_write, which reports tlb->segfault_addr, but nothing on that path set it. The fault carried a stale address: if mapped, the instruction retried forever; if not, the guest got a SIGSEGV for an unrelated address. Raise SIGBUS (BUS_ADRALN) at the operand instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
On aarch64,
lock cmpxchg8bon an address that isn't 8-byte aligned branches tosegfault_write. That exit reportstlb->segfault_addr, but nothing on this path sets it, so the fault carries whatever address is left over:Python 3.14, which Alpine 3.24 ships, hits this at startup and does either one, depending on what was left there.
As discussed in #2813, this raises SIGBUS instead, with
BUS_ADRALNand the operand's address. The x86_64 host's gadget uses the host's ownlock cmpxchg8band is unchanged.Tested on an arm64 Mac with the Alpine 3.24 x86 rootfs:
__atomic_fetch_addon auint64_tgets SIGBUS, withsi_code1 andsi_addrat the operand.python3now exits with "Bus error" instead of hanging or segfaulting.🤖 Generated with Claude Code