Re: [kernel-hardening] Re: 2015 kernel CVEs

From: Eric W. Biederman
Date: Tue Jan 19 2016 - 17:51:46 EST

Al Viro <viro@xxxxxxxxxxxxxxxxxx> writes:

> On Tue, Jan 19, 2016 at 02:28:12PM +0300, Dan Carpenter wrote:
>> CVE-2015-4178 820f9f147dcc: fs_pin: uninitialized data
> Why is that a CVE? Affected code is in pin_remove(), which is only
> called from fs_pin ->kill() instances; if one is _ever_ called more
> than once per fs_pin lifetime, we are already FUBAR. If Eric had
> ever intended to add checks for hlist_unhashed() on those lists,
> such checks never had been added to the tree. They definitely did not
> exist at the moment when that commit went in.
> It got merged mostly on the "it doesn't harm anything and it's a bit
> more tidy that way" basis; if it had ever changed behaviour in any visible
> way, *THEN* we had a real problem and that problem was not fixed by that
> commit, so I would really like to see the details - simply to make sure
> that the damn thing had been eventually fixed.
> Eric, could you explain? And could whoever'd been responsible for
> that CVE describe the process that had lead to its creation?

As best I know this was an issue because someone borked a backport,
and skipped this patch.

As I recall hlist_del_init was needed because in one instance one of the
lists was not used. Which is actually what it says in the description
of 820f9f147dcc so I will leave it at that.