Local root vulnerability in snap-confine
Local root vulnerability in snap-confine
Posted Feb 21, 2022 15:20 UTC (Mon) by rgmoore (✭ supporter ✭, #75)In reply to: Local root vulnerability in snap-confine by roc
Parent article: Local root vulnerability in snap-confine
I think your comment gets very nicely at the root of our problems. We will never get security right as long as it is given lower priority than convenience and performance.
Posted Feb 22, 2022 2:29 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
As for convenience, sure it's handy to be able to pass a "string" around in a register because it's "just" the size of a pointer, but weighing that against the inconvenience of having to debug mishandling of these APIs, they are by *far* in the red in my book. I mean, we have how many flavors of "append a string"? `strcat`, `strncat`, and `strlcat`? Toss `snprintf` in there too if you want to be fancy. And there's not even *consensus* on this set. Reviewing code dense with use of the C string library requires notes because I need to track where lengths are coming from, are the right APIs being used, and "oh, that's just a poorly coded `strdup`" recognitions. I don't find it useful.
So given that it scores (IMO) a 2/5 on performance (sure, registers get you something I guess), 1/5 in (overall) convenience, and 0/5 on security because the APIs just don't help out half the time, why, specifically, would roc's "attitude" not be warranted?
Local root vulnerability in snap-confine