Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405540
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86: fix potential memleak in do_error_trap |
| Date | 2016-05-23 19:50 +0200 |
| Message-ID | <rC29j-u0-13@gated-at.bofh.it> (permalink) |
| References | <rBW3U-56T-13@gated-at.bofh.it> <rBYyK-6yX-23@gated-at.bofh.it> <rC07w-7GV-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 23-05-16 17:33:55, Oleg Nesterov wrote:
> 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).
Ohh, you are right. Dunno, how I managed to miss it. Sorry about the
noise.
> But even if not, shuldn't we change fill_trap_info() instead ?
Yes that would be the proper place.
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
siginfo memory leak? Michal Hocko <mhocko@kernel.org> - 2016-05-23 13:20 +0200
Re: siginfo memory leak? Martin Schwidefsky <schwidefsky@de.ibm.com> - 2016-05-23 14:50 +0200
Re: siginfo memory leak? Michal Hocko <mhocko@kernel.org> - 2016-05-23 15:10 +0200
Re: siginfo memory leak? Martin Schwidefsky <schwidefsky@de.ibm.com> - 2016-05-23 15:30 +0200
Re: siginfo memory leak? Michal Hocko <mhocko@kernel.org> - 2016-05-23 15:40 +0200
[PATCH] s390: fix info leak in do_sigsegv Michal Hocko <mhocko@kernel.org> - 2016-05-23 15:50 +0200
Re: [PATCH] s390: fix info leak in do_sigsegv Martin Schwidefsky <schwidefsky@de.ibm.com> - 2016-05-23 16:50 +0200
[PATCH] x86: fix potential memleak in do_error_trap Michal Hocko <mhocko@kernel.org> - 2016-05-23 16:00 +0200
Re: [PATCH] x86: fix potential memleak in do_error_trap Oleg Nesterov <oleg@redhat.com> - 2016-05-23 17:40 +0200
Re: [PATCH] x86: fix potential memleak in do_error_trap Michal Hocko <mhocko@kernel.org> - 2016-05-23 19:50 +0200
Re: siginfo memory leak? Oleg Nesterov <oleg@redhat.com> - 2016-05-23 17:50 +0200
csiph-web