[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"cannot execute binary file" error with Bash 5.2

From: loic . yhuel
Subject: "cannot execute binary file" error with Bash 5.2
Date: Mon, 14 Nov 2022 20:40:07 +0100
User-agent: Heirloom mailx 12.5 7/5/10

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g 
-grecord-gcc-switches -pipe -Wall -Werror=format-security 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
uname output: Linux sah1lpt664 6.0.5-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed 
Oct 26 15:55:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 5.2
Patch Level: 2
Release Status: release

        I can no longer run xxx-ct-ng.config scripts produced by crosstool-ng.
        Those just contain a few lines of script, with appended bzip2 
compressed text. 
        Bash 5.2 changed the check_binary_file function, it seems any NUL in 
the first
        80 characters will cause the error.

        Create a test.sh with :
        tail -n+4 "${0}" | bzcat
        exit 0

        $ echo foo | bzip2 >> test.sh
        $ bash ./test.sh
        ./test.sh: ./test.sh: cannot execute binary file

reply via email to

[Prev in Thread] Current Thread [Next in Thread]