Skip to content

--set-interpreter lost compatibility with Linux 5.17 and below #601

@avikivity

Description

@avikivity

Describe the bug

Linux 5.17 and below have a bug, later fixed by torvalds/linux@0da1d50. That bug was accounted for in patchelf, but a recent patch (43b75fb) broke compatibility with these older kernels.

Steps To Reproduce

  1. patchelf --set-interpreter /path/to/new/interpreter
  2. patchelf allocates new sections at the end
  3. run on Linux 5.17 or below
  4. crash

I can supply a full reproducer if needed, but since the regression was deliberate, I don't think it's necessary. I can do it if required.

Expected behavior

A clear and concise description of what you expected to happen.

I'd like to restore compatibility with Linux 5.17, perhaps with a switch.

patchelf --version output

patchelf 0.18.0

Additional context

Running patchelf on Fedora 42 (patchelf-0.18.0-8.fc42.x86_64) and the patched binary on CentOS 9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions