Re: CVE-2016-7097 causes acl leak

From: Cong Wang
Date: Mon Dec 12 2016 - 16:10:51 EST

On Mon, Dec 12, 2016 at 2:46 AM, Jan Kara <jack@xxxxxxx> wrote:
> So I agree with you the mentioned commit didn't change anything. I took
> care to keep the previous behavior wrt NULLing the acl pointer (obviously I
> could have made mistake somewhere but I don't see where). However your
> patch is definitely wrong. See e.g. fs/ext2/acl.c: ext2_set_acl() - there we
> really want to just clear the pointer. We release the ACL in the caller of
> ext2_set_acl().

Hmm, that is very subtle, are you saying we don't carry the change out of
set_posix_acl() because we modify its argument on stack? This is clearly
an anti-pattern in kernel code base.