public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] __send_signal: pass q->info, not info, to userns_fixup_signal_uid (v2)
@ 2011-11-19  0:41 Serge Hallyn
  2011-11-19 16:06 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Serge Hallyn @ 2011-11-19  0:41 UTC (permalink / raw)
  To: Andrew Morton, Eric W. Biederman
  Cc: richard, containers, oleg, eparis, linux-kernel, dhowells

Eric Biederman pointed out that passing info is a bug and could lead
to a NULL pointer deref to boot.

A collection of signal, securebits, filecaps, cap_bounds, and a few other ltp
tests passed with this kernel.

Changelog:
    Nov 18: previous patch missed a leading '&'

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
---
 kernel/signal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index c0f0782..170586b 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1118,7 +1118,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
 			break;
 		}
 
-		userns_fixup_signal_uid(info, t);
+		userns_fixup_signal_uid(&q->info, t);
 
 	} else if (!is_si_special(info)) {
 		if (sig >= SIGRTMIN && info->si_code != SI_USER) {
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] __send_signal: pass q->info, not info, to userns_fixup_signal_uid (v2)
  2011-11-19  0:41 [PATCH 1/1] __send_signal: pass q->info, not info, to userns_fixup_signal_uid (v2) Serge Hallyn
@ 2011-11-19 16:06 ` Jiri Slaby
  2011-11-22  0:45   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2011-11-19 16:06 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: Andrew Morton, Eric W. Biederman, richard, containers, oleg,
	eparis, linux-kernel, dhowells

On 11/19/2011 01:41 AM, Serge Hallyn wrote:
> Eric Biederman pointed out that passing info is a bug and could lead
> to a NULL pointer deref to boot.

It would be great if you could describe what bug you are fixing in fact
in the commit log. "Something that could lead to a bug" is not helpful
at all.

A link to the thread where Eric pointed *that* out would be enough.

> A collection of signal, securebits, filecaps, cap_bounds, and a few other ltp
> tests passed with this kernel.
> 
> Changelog:
>     Nov 18: previous patch missed a leading '&'
> 
> Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
> ---
>  kernel/signal.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/signal.c b/kernel/signal.c
> index c0f0782..170586b 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -1118,7 +1118,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
>  			break;
>  		}
>  
> -		userns_fixup_signal_uid(info, t);
> +		userns_fixup_signal_uid(&q->info, t);
>  
>  	} else if (!is_si_special(info)) {
>  		if (sig >= SIGRTMIN && info->si_code != SI_USER) {

thanks,
-- 
js

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] __send_signal: pass q->info, not info, to userns_fixup_signal_uid (v2)
  2011-11-19 16:06 ` Jiri Slaby
@ 2011-11-22  0:45   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2011-11-22  0:45 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Serge Hallyn, Eric W. Biederman, richard, containers, oleg,
	eparis, linux-kernel, dhowells

On Sat, 19 Nov 2011 17:06:49 +0100
Jiri Slaby <jirislaby@gmail.com> wrote:

> On 11/19/2011 01:41 AM, Serge Hallyn wrote:
> > Eric Biederman pointed out that passing info is a bug and could lead
> > to a NULL pointer deref to boot.
> 
> It would be great if you could describe what bug you are fixing in fact
> in the commit log. "Something that could lead to a bug" is not helpful
> at all.
> 
> A link to the thread where Eric pointed *that* out would be enough.

What Serge is secretly hiding from everyone is that this patch is a
fixup against his earlier "user namespace: make signal.c respect user
namespaces v5".  So the fix isn't very interesting for people who
aren't running that patch.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-22  0:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19  0:41 [PATCH 1/1] __send_signal: pass q->info, not info, to userns_fixup_signal_uid (v2) Serge Hallyn
2011-11-19 16:06 ` Jiri Slaby
2011-11-22  0:45   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox