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]
Message-ID: <20111009190344.GB13853@redhat.com>
Date:	Sun, 9 Oct 2011 21:03:44 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	"Serge E. Hallyn" <serge@...lyn.com>
Cc:	"Serge E. Hallyn" <serge.hallyn@...onical.com>,
	lkml <linux-kernel@...r.kernel.org>, richard@....at,
	Andrew Morton <akpm@...gle.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] user namespace: make signal.c respect user namespaces

On 10/08, Serge E. Hallyn wrote:
>
> Quoting Oleg Nesterov (oleg@...hat.com):
> >
> > +static inline fixup_uid(struct siginfo *info, struct task_struct *t)
> > +{
> > +#ifdef CONFIG_USER_NS
> > +	if (current_user_ns() == task_cred_xxx(t, user_ns)))
> > +#endif
> > +		return;
> > +
> > +	if (SI_FROMKERNEL(info))
> > +		switch (info->si_code & __SI_MASK) {
> > +			default:
> > +				return;
> > +
> > +			case __SI_CHLD:
>
> After looking a bit more, I really think the __SI_CHLD case just needs to
> always be converted at the callers (i.e. do_notify_parent).

Yes, unfortunately.

> > +			case __SI_MESGQ:
>
> This can be done like this, but if this is going to be the only case of
> a SI_FROMKERNEL not being converted at the caller, and there is aiui only
> one caller (__do_notivy in ipc/mmqueue.c), it seems better to just have
> fixup_uid() always return for SI_FROMKERNEL(info).

Yes, agreed.

Oleg.

--
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