Re: Sourceware mitigating and preventing the next xz-backdoor

Richard Biener <[email protected]>
Newsgroups gmane.comp.gnu.binutils,gmane.comp.gcc.devel,gmane.comp.gdb.devel,gmane.comp.lib.glibc.alpha
Message-ID <CAFiYyc11pjFtSkJbEJqhDN39YKx=XibgDpfZ7xsgS77EDM+1gw@mail.gmail.com>
On Fri, Apr 5, 2024 at 11:18 PM Andrew Sutton via Gcc <[email protected]> wrote:
>
> >
> >
> >
> > > I think the key difference here is that Autotools allows arbitrarily
> > generated code to be executed at any time. More modern build systems
> > require the use of specific commands/files to run arbitrary code, e.g.
> > CMake (IIRC [`execute_process()`][2] and [`ExternalProject`][3]), Meson
> > ([`run_command()`][1]), Cargo ([`build.rs`][4]).\
> >
> > To me it seems that Cargo is the absolute worst case with respect to
> > supply chain attacks.
> >
> > It pulls in dependencies recursively from a relatively uncurated
> > list of projects, puts the source of all those dependencies into a
> > hidden directory in home, and runs Build.rs automatically with
> > user permissions.
> >
>
> 100% this. Wait until you learn how proc macros work.

proc macro execution should be heavily sandboxed, otherwise it seems
compiling something is enough to get arbitrary code executed with the
permission of the compiling user.  I mean it's not rocket science - browsers
do this for javascript.  Hmm, we need a webassembly target ;)

Richard.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.