Skip to content

Bugfix/selinux#496

Merged
piyush-jena merged 4 commits into
bottlerocket-os:developfrom
piyush-jena:bugfix/selinux
Jul 14, 2026
Merged

Bugfix/selinux#496
piyush-jena merged 4 commits into
bottlerocket-os:developfrom
piyush-jena:bugfix/selinux

Conversation

@piyush-jena

@piyush-jena piyush-jena commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Issue: #494

Description of changes:

  • Undo patches that break dotnet workloads

Testing done:

  • dotnet container works on ecs-4 and k8s-1.35 variants
    Before the dmesg logs showed the following SELinux issue
Jul 13 19:01:36 ip-172-31-54-195.us-west-2.compute.internal audit[5625]: AVC avc:  denied  { execmem } for  pid=5625 comm="dotnet" scontext=system_u:system_r:runtime_t:s0:c0.c1023 tcontext=system_u:system_r:runtime_t:s0:c0.c1023 tclass=process permissive=0
Jul 13 19:01:36 ip-172-31-54-195.us-west-2.compute.internal kernel: audit: type=1400 audit(1783969296.349:16): avc:  denied  { execmem } for  pid=5625 comm="dotnet" scontext=system_u:system_r:runtime_t:s0:c0.c1023 tcontext=system_u:system_r:runtime_t:s0:c0.c1023 tclass=process permissive=0

and the kubectl logs threw this

Failed to load System.Private.CoreLib.dll (error code 0x8007000C)
Path: /usr/lib64/dotnet/shared/Microsoft.NETCore.App/9.0.6/System.Private.CoreLib.dll
Error message: Could not load file or assembly 'System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. The access code is invalid.
 (0x8007000C)
Failed to create CoreCLR, HRESULT: 0x8007000C

After the fix:
kubectl logs

$ kubectl logs hello-dotnet --kubeconfig ../kubeconfig/bottlerocket-cluster-135.kubeconfig

Welcome to .NET 9.0!
---------------------
SDK Version: 9.0.107

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https

----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring /Hello/Hello.csproj:
  Determining projects to restore...
  Restored /Hello/Hello.csproj (in 121 ms).
Restore succeeded.


hello, dotnet

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@piyush-jena
piyush-jena marked this pull request as ready for review July 14, 2026 01:16
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
@piyush-jena

Copy link
Copy Markdown
Contributor Author

CI had passed before the last change.

@piyush-jena
piyush-jena merged commit 23b03c5 into bottlerocket-os:develop Jul 14, 2026
3 checks passed
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.

3 participants