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

Re: stack smashing detected



Hi Finn,

Am 18.02.2023 um 12:49 schrieb Finn Thain:
On Sat, 18 Feb 2023, Andreas Schwab wrote:

On Feb 18 2023, Finn Thain wrote:

Why do you say init ignores SIGABRT?

PID 1 is special, it never receives signals it doesn't handle.


I see. I wonder if there is some way to configure the kernel so that PID 1
could be aborted for fstack-protector. I doubt it.

You could add SIGABRT to the list of signals handled by init (see init.c:init_main() and init.c:process_signals() in the sysvinit source).

Not sure it's wise to allow init to abort though. You could instead try to use a similar signal handler to segv_handler(), and dump core when receiving the signal? Maybe re-exec init instead of continuing?


My gut says that a compiler change somehow made the fstack-protector
implementation insensitive to kernel configuration.

So I still think that, if Stan adopted Debian's build environment, random
processes would cease to be aborted (regardless of kernel .config).

Changes in compiler version between sysvinit 3.01 and 3.06 might cause a bisect using snapshot binaries and a bisect using recompiled binaries to differ. But using a build environment equivalent to that used by the package autobuilders is certainly good advice.

Or did you mean the kernel build environment?

Cheers.

	Michael


Reply to: