-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow registering interpreters for miscellaneous binary formats #249
Conversation
But for execution, the execution bit (" The execution bit afaik cannot set itself. Also trivial to circumvent for an attacker. Instead of only using |
Great points, you are correct. I suppose the only scenario in which this parameter is useful is the case of the less sophisticated scripts after being granted the execution bit. It might still be useful perhaps against older existing legacy malware that has yet to adapt? So suppose user grants the execution bit and the script is actually invoking other interpreter without user being aware. There are at least 3 ways to proceed with this PR:
How would you like to proceed? |
Not sure there is any legacy malware where this would have been the case?
Yes.
This seems useful. |
Done. I have gone with option 2 and made the |
Note KSPP also recommends setting
So should we adhere to KSPP? |
Yes. Could you please document with this reasoning? |
Done. The KSPP notice style is preliminary and we can change it later to be consistent with what will be eventually decided as per #256. |
Looks great! Where can we see that
Cannot find a manual for it.
That would imply that we want to set How to actually test if the setting change takes effect? |
I am not sure why it does not show up properly on kernel.org here: I think it may just be case of the documentation not having been updated? Regarding functionality, as per the references, first see here: By default:
Next, trying your suggestion:
By this PR:
It appears that kernel only recognises My system is rather hardened and so I do not have many executable formats so can not display any changes on my end. To then test that it is functioning properly, one can always use |
Alright, |
Disallow registering interpreters for various (miscellaneous) binary formats based on a magic number or their file extension to prevent unintended code execution.
Breaks many scripts that do not have appropriate shebang interpreter directives (#!/bin/...).
Changes
Set
sysctl fs.binfmt_misc.status=0
.Mandatory Checklist
Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint
Optional Checklist
The following items are optional but might be requested in certain cases.