[1]: https://gitlab.gnome.org/GNOME/tracker-miners/-/commit/f0c88...
This is one of the things that really scares me, not just in Linux but in every operating system. Afaik, metadata scanning is one of the biggest zero-click attack vectors on iOS.
In Linux I try to execute as much as possible under a sandbox (firejail), hoping that this makes any difference, but deep inside I am terrified about the piles upon piles of ancient C code running from Gnome all the way down to the driver stack...
Edit - from the article:
"There are two parts to the problem. The first is that the scanner (cue_scanner.l, line 132) uses atoi to scan the integers: [...] atoi does not check for integer overflow, so it is easy to construct a negative index. [...]
The second part of the problem (and this is the actual vulnerability) is that track_set_index does not check that i ≥ 0"
I hate to be that guy, but maybe C should no longer be considered a valid option for parsing unknown input, aka the first line of defense...
Firejail exposes you to bugs in kernel. Not much better than tracker.
Yeah, so easy that literally nobody does this.
People lock down some syscalls and call it "sandbox", despite the fact that the untrusted code is still running directly on your cpu and has access to all remaining kernel interfaces. "sandbox" is a misnomer for this. It should be sth like "there is a fence over there".
Linux lacks effective sandboxing.
It *does* have complex, comprehensive, powerful, and therefore hard-to-use sandboxing, which is the actual root of the problem here: if security is difficult to implement, it will often end up being ineffective.
Compare <https://man7.org/linux/man-pages/man2/seccomp.2.html> vs <http://man.openbsd.org/pledge.2>. The two mechanisms have roughly the same goals. The former requires writing a BPF program; the latter is a single function call.
The real vulnerability of concern IMO is that the sandbox was so easily escaped.
There's very likely piles of bugs in all the surface area of everything involved in extracting/scanning the files. It definitely doesn't end here with this libcue bug.
The only thing making this architecture remotely sane is the sandboxing. It's rather concerning that was so easily bypassed TFA hadn't even realized they were escaping a sandbox.