lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Sep 2013 09:30:13 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Tejun Heo <tj@...nel.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [PATCH] kernel/groups.c: consider about NULL for 'group_info'
 in all related extern functions

On 09/26/2013 09:15 PM, Tejun Heo wrote:
> Hello, Chen.
> 
> On Thu, Sep 26, 2013 at 02:30:31PM +0800, Chen Gang wrote:
>>> Oh, not cause issue, the reason is "'groups' exports extern variable
>>> 'init_groups', when start process, default 'cred' will set it to be
>>> sure of groups always be initialized".
>>>
>>> Hmm... but after all, I still think this file need be improved: "remove
>>> the group_info checking in groups_search()", please help check, thanks.
> 
> Given the track record upto this point and how marginal the benefit of
> the suggested change is, I'd rather not.  It's quite possible that we
> had specific issue where that extra conditional is necessary and I
> don't feel comfortable trusting your evaluation and analysis on the
> subject at the moment, so the benefit / risk ratio seems way off from
> my pov.
> 
>>>   If groups_alloc() fails, the caller must not call any related API again
>>>   with the related invalid 'group_info'.
>>>
>>>
>>> Signed-off-by: Chen Gang <gang.chen@...anux.com>
> 
> Nacked-by: Tejun Heo <tj@...nel.org>
> 

The caller should not 'generate' a new 'groups_info' by itself, so, if
invalid 'groups_info' should not pass to groups_free(), of cause it
should not pass groups_search(), either.

If permit passing an invalid 'groups_info' to groups_search(), caller
also can pass this invalid 'groups_info' to groups_free(), too.

The original author exported extern variable 'init_groups', that means
'groups' wants no duty to be sure 'group_info' whether valid, caller
should be sure of that (or it is caller's bug, not 'groups' bug).


In my opinion, it is enough to know 'groups' interface is inconsistent,
it needs improvement (in fact, I don't think it's a good idea to export
'init_groups', neither good to let caller sure of 'group_info' valid).


As an integrator or large source code maintainer, we cannot only depend
on testing, or tracing log, or some short directly causes; we also need
find and solve issues by checking sub-systems' interface or documents.

> Thanks.
> 

Thanks.
-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ