Skip to content

Disable ASLR to work around QEMU aarch64 issues#229

Merged
agners merged 1 commit intomasterfrom
disable-aslr-to-fix-qemu
Feb 25, 2025
Merged

Disable ASLR to work around QEMU aarch64 issues#229
agners merged 1 commit intomasterfrom
disable-aslr-to-fix-qemu

Conversation

@agners
Copy link
Member

@agners agners commented Feb 20, 2025

It seems that QEMU and Address Space Layout Randomization do not work well toghether currently. Linux kernel security hardening efforts which make ASLR more random seem to cause SEGFAULTs randomly when building things for aarch64.

It seems that the QEMU for aarch64 made assumptions about how the memory layout is laid out, and/or has bugs in the implementation which are exarbated by the new ASLR scheme. In any case, disabling ASLR during build time avvoids hitting the QEMU bugs.

It seems that QEMU and Address Space Layout Randomization do not work
well toghether currently. Linux kernel security hardening efforts which
make ASLR more random seem to cause SEGFAULTs randomly when building
things for aarch64.

It seems that the QEMU for aarch64 made assumptions about how the memory
layout is laid out, and/or has bugs in the implementation which are
exarbated by the new ASLR scheme. In any case, disabling ASLR during
build time avvoids hitting the QEMU bugs.
@agners
Copy link
Member Author

agners commented Feb 20, 2025

This seem to effectively work around the QEMU issues we are seeing. Test run with Ubuntu 24.04 builder and the action with this modification: https://github.com/home-assistant/docker-base/actions/runs/13446504831/job/37573486076.

Copy link
Member

@sairon sairon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should be fine without ASLR at this stage, so 👍

@agners agners merged commit 919a224 into master Feb 25, 2025
11 checks passed
@agners agners deleted the disable-aslr-to-fix-qemu branch February 25, 2025 13:10
sairon added a commit that referenced this pull request Dec 9, 2025
This reverts commit 919a224.

The workaround should be no longer necessary. Especially since we
mainly use native ARM runners for building instead of QEMU.
sairon added a commit that referenced this pull request Dec 9, 2025
This reverts commit 919a224.

The workaround should be no longer necessary. Especially since we
mainly use native ARM runners for building instead of QEMU.
agners pushed a commit that referenced this pull request Jan 29, 2026
This reverts commit 919a224.

The workaround should be no longer necessary. Especially since we
mainly use native ARM runners for building instead of QEMU.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants