News for hackers. Stuff that matters.
Re:Systemd v228 local root exploit by jacobmischka on Tuesday January 24, 2017 @09:41AM (#13471614)
I think your being so quick to judge anything using JavaScript as inherently bad is silly, but this link just made me realize that using sudo with systemd as I had been seems to be incorrect, so thanks for the link.
Re:Systemd v228 local root exploit by ioquatix on Tuesday January 24, 2017 @09:52AM (#13471704)
Let's say you write some authorisation code using JavaScript. If it contains a syntax error, or a logic error your authentication is broken for your entire system. Checking the correctness of a program is usually non-trivial, but I accept some things CAN be checked (e.g. syntax). However, JavaScript, naturally is a procedural language and hence the bulk of your problems would be in your logic.

In contrast, /etc/sudoers{.d} config is syntactically validated using a strict grammar so that it can be validated for correctness before being loaded and used (hence visudo). It's primarily a declarative language too which means that logic bugs aren't really possible. This means that there is a robust mechanism to detect syntax issues (and some semantic issues) before breaking your system.

Re:Systemd v228 local root exploit by jhasse on Tuesday January 24, 2017 @10:17AM (#13471959)
What if the program reading /etc/sudoers{.d} has a bug and crashes?
Re:Systemd v228 local root exploit by jacobmischka on Tuesday January 24, 2017 @01:56PM (#13474332)
Exactly, like the link says, at least it runs without permissions and is sandboxed.
Re:Systemd v228 local root exploit by ioquatix on Wednesday January 25, 2017 @07:25AM (#13480815)
Then.. sudo has a bug and should be fixed?
Re:Systemd v228 local root exploit by jhasse on Wednesday January 25, 2017 @09:01AM (#13481388)
But the same can be said about your "authorisation code using JavaScript".
Re:Systemd v228 local root exploit by ioquatix on Wednesday January 25, 2017 @07:23PM (#13487561)
Yes, but one is written by a developer, and one is written by a user. That's a pretty big difference, IMHO.