All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: Mis-generation of shell script (run.do_install)?
Date: Mon, 17 Dec 2018 12:21:18 -0800	[thread overview]
Message-ID: <CAJ86T=V-xs=M2DfsHHtOe=j77bqsn=MgMojue5mc=2ouwwTd+A@mail.gmail.com> (raw)
In-Reply-To: <a0e331f39da396ea39ea37539f6c1ea193b055b1.camel@linuxfoundation.org>

On Mon, Dec 17, 2018 at 6:44 AM <richard.purdie@linuxfoundation.org> wrote:
>
> On Sat, 2018-12-15 at 20:19 -0500, Jason Andryuk wrote:
> > As far as I can tell, pysh is working properly - it's just the
> > bb_codeparser.dat which is returning the incorrect shellCacheLine
> > entry.  It seems like I have an md5 collision between a pyro core2-64
> > binutils do_install and core2-32 python-async distutils_do_install in
> > the shellCacheLine.  python-async's entry got in first, so that's why
> > binutils run.do_install doesn't include autotools_do_install - the
> > shellCacheLine `execs` entry doesn't include it.  Or somehow the
> > `bb_codeparser.dat` file was corrupted to have an incorrect `execs`
> > for the binutils do_install hash.
>
> That is rather worrying. Looking at the known issues with md5, I can
> see how this could happen though.

How do you see this could happen? By random bad luck?

Despite md5 now being susceptible to targeted attacks, the chances of
accidentally hitting a collision between two 128bit hashes is as
unlikely as it's always been.

  http://big.info/2013/04/md5-hash-collision-probability-using.html

"It is not that easy to get hash collisions when using MD5 algorithm.
Even after you have generated 26 trillion hash values, the probability
of the next generated hash value to be the same as one of those 26
trillion previously generated hash values is 1/1trillion (1 out of 1
trillion)."

It seems much more likely that there's a bug somewhere in the way the
hashes are used. Unless we understand that then switching to a longer
hash might not solve anything.

> I think this means we need to switch to a better hash mechanism. I've
> sent a patch changing this to sha256 on the bitbake list.
>
> We also probably need to change over the code in siggen for the sstate
> hashes too but one step at a time...
>
> Cheers,
>
> Richard
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2018-12-17 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 13:42 Mis-generation of shell script (run.do_install)? Jason Andryuk
2018-12-11 15:02 ` Richard Purdie
2018-12-14 19:30   ` Jason Andryuk
2018-12-15 10:51     ` richard.purdie
2018-12-16  1:19       ` Jason Andryuk
2018-12-17 14:44         ` richard.purdie
2018-12-17 20:21           ` Andre McCurdy [this message]
2018-12-17 21:24             ` richard.purdie
2018-12-18 17:45               ` Jason Andryuk
2019-01-08 18:26                 ` richard.purdie
2019-01-16 13:55                   ` Jason Andryuk
2019-01-16 14:02                     ` Richard Purdie
2019-01-16 20:20                       ` Jason Andryuk
2019-01-16 20:28                         ` Richard Purdie
2019-01-17 17:10                           ` Jason Andryuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ86T=V-xs=M2DfsHHtOe=j77bqsn=MgMojue5mc=2ouwwTd+A@mail.gmail.com' \
    --to=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.