Skip to content

[s390x] Missing full RELRO (-z,now) support in a mono-based libcoreclr.so #59904

@omajid

Description

@omajid

Description

.NET has full relro (See #632) enabled for all unmanaged libraries, including libcoreclr.so. For more background on full RELRO, see https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro.

Unfortunately, full RELRO is not enabled for a mono-based libcoreclr.so, such as the one that gets used on s390x. -z,relro is present but not -z,now.

I am running a self-built .NET SDK based on source-build on s390x for this:

$ readelf -l /usr/lib64/dotnet/shared/Microsoft.NETCore.App/6.0.0-rc.2.21470.23/libcoreclr.so | grep GNU_RELRO
  GNU_RELRO      0x00000000004ae4e8 0x00000000004af4e8 0x00000000004af4e8                                            
$ readelf -d /usr/lib64/dotnet/shared/Microsoft.NETCore.App/6.0.0-rc.2.21470.23/libcoreclr.so | grep BIND_NOW

Configuration

This is a self-built .NET SDK on s390x running on RHEL 8:

$ /usr/lib64/dotnet/dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-rc.2.21474.1
 Commit:    28be3e9a00

Runtime Environment:
 OS Name:     rhel
 OS Version:  8
 OS Platform: Linux
 RID:         rhel.8-s390x
 Base Path:   /usr/lib64/dotnet/sdk/6.0.100-rc.2.21474.1/

Host (useful for support):
  Version: 6.0.0-rc.2.21470.23
  Commit:  826f81a11a

.NET SDKs installed:
  6.0.100-rc.2.21474.1 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-rc.2.21470.37 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-rc.2.21470.23 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

This was built from dotnet/installer commit 28be3e9a006d90d8c6e87d4353b77882829df718.

Regression?

This is a regression compared to Intel (x64)

cc @uweigand @BahaVv

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions