Skip to content

Fix issues with SELinux#483

Open
ardovm wants to merge 3 commits into
AOO41Xfrom
AOO41X_execstack
Open

Fix issues with SELinux#483
ardovm wants to merge 3 commits into
AOO41Xfrom
AOO41X_execstack

Conversation

@ardovm

@ardovm ardovm commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Newer Linux distributions come with SELinux on by default.
Binaries produced by our "official" build VM do not take that into account.

This pull request is against the AOO41X branch because AOO42X and trunk are supposed to be built with more recent compilers, that do not need this additional invocation of execstack.

Also check for execstack in the configure script.
@DamjanJovanovic

Copy link
Copy Markdown
Contributor

Why do we need executable stacks? That seems like a bad idea. Is it the main/bridges code that generates executable snippets of machine code?

@ardovm

ardovm commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

I am not sure about what module needs that particular feature.

When running AOO 4.1.16 on systems with SELinux enabled, error messages appear and the audit logs contain entries like the following:

time->Sat Jan 10 18:23:08 2026 type=AVC msg=audit(1768065788.356:276): avc:  denied  { execstack } for  pid=5517 comm="soffice.bin" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=process permissive=0

Please see this thread on dev@.

@ardovm

ardovm commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

I understood that I was trying to solve the wrong problem.
Stacks shall not be executable!
The culprit seems to be the raptor library. This PR now ensures that it is built with noexecstack under Linux.

This PR is supposed to be squashed and merged.

@ardovm ardovm requested a review from DamjanJovanovic June 12, 2026 19:40
LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
.ENDIF # "$(OS)$(COM)"=="SOLARISC52"

.IF "$(OS)"=="LINUX"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we also test for OS="FREEBSD", or use GUI="UNX" instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IIRC FreeBSD has GCC and Clang... does Clang accept -Wl,-z,noexecstack? Otherwise we need to differentiate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants