public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Aleksa Sarai <asarai@suse.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	linux-s390@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: [PATCH] x86: fix potential memleak in do_error_trap
Date: Mon, 23 May 2016 17:33:55 +0200	[thread overview]
Message-ID: <20160523153355.GA8449@redhat.com> (raw)
In-Reply-To: <20160523135428.GU2278@dhcp22.suse.cz>

On 05/23, Michal Hocko wrote:
>
> @@ -271,6 +271,7 @@ static void do_error_trap(struct pt_regs *regs, long error_code, char *str,
>
>  	if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) !=
>  			NOTIFY_STOP) {
> +		memset(&info, 0, sizeof(info));
>  		cond_local_irq_enable(regs);
>  		do_trap(trapnr, signr, str, regs, error_code,
>  			fill_trap_info(regs, signr, trapnr, &info));

at first glance fill_trap_info() initializes everything we will copy
to user-space in copy_siginfo_to_user(__SI_FAULT).

But even if not, shuldn't we change fill_trap_info() instead ?

Oleg.

  reply	other threads:[~2016-05-23 15:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 11:16 siginfo memory leak? Michal Hocko
2016-05-23 12:43 ` Martin Schwidefsky
2016-05-23 13:05   ` Michal Hocko
2016-05-23 13:29     ` Martin Schwidefsky
2016-05-23 13:34       ` Michal Hocko
2016-05-23 13:43 ` [PATCH] s390: fix info leak in do_sigsegv Michal Hocko
2016-05-23 14:47   ` Martin Schwidefsky
2016-05-23 13:54 ` [PATCH] x86: fix potential memleak in do_error_trap Michal Hocko
2016-05-23 15:33   ` Oleg Nesterov [this message]
2016-05-23 17:47     ` Michal Hocko
2016-05-23 15:42 ` siginfo memory leak? Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160523153355.GA8449@redhat.com \
    --to=oleg@redhat.com \
    --cc=asarai@suse.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@elte.hu \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox