mcfly
mcfly copied to clipboard
bash: Denied TIOCSTI ioctl for non-privileged process
Hitting Enter does not do anything, echo $? shows 0 though.
I found that it's adding this line in journalctl after each Enter or Tab:
Dec 15 14:44:51 hostname kernel: (NULL device *): Denied TIOCSTI ioctl for non-privileged process
Exiting it with Ctrl + C does not have this effect.
BTW I use arch :) and linux-hardened (https://github.com/anthraxx/linux-hardened).
Yes, just confirmed it works on another kernel without the hardening flags upon compile, I'll try to find and see which one prevents the mcfly from working and if there is workaround or not.
I'm not sure if there is a workaround for this in runtime or not, but maybe there is a mcfly configuration which prevents these calls? Although I don't think mcfly can work without these... :(
https://github.com/anthraxx/linux-hardened/commit/8aacf45
https://github.com/anthraxx/linux-hardened/commit/70d9a4
mcfly works in zsh without TIOCSTI I think, but not bash.
mcfly works in zsh without TIOCSTI I think, but not bash.
I have installed zsh and I can confirm mcfly works fine using it, bash still has the same problem though.
Feel free to close the issue if there isn't an interest in fixing it, too customized environment, ...
Not sure if this can be fixed, but if so it should be done so I would leave the issue open.
The option is now CONFIG_LEGACY_TIOCSTI in the kernel as of 6.2.0. Leave it enabled as disabling it can bring up too many unexpected broken-ness.
@Tatsh Thanks for taking a look into it, linux-hardened has not been updated to 6.2 yet, I'll report back after upgrading to 6.2 if this issue has been changed or not.
@Tatsh Thanks for taking a look into it, linux-hardened has not been updated to 6.2 yet, I'll report back after upgrading to 6.2 if this issue has been changed or not.
If you disable CONFIG_LEGACY_TIOCSTI mcfly and other things really strangely do not work.
OK, linux-hardened has been upgraded to 6.4.3 and I could finally test this. It's still not working, but I think this is another issue.
Nothing shows up in journal, but hitting enter still does not do anything.
echo $? prints 130.
Capabilities might be useful to allow mcfly admin access without compromising the rest of the system. Still it does not make sense that mcfly should need that level of access. I have not found sufficient information about what other projects are doing about this. Most distros are leaving this option enabled.