linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	adobriyan@gmail.com, ebiederm@xmission.com, lizetao1@huawei.com
Cc: Kees Cook <keescook@chromium.org>,
	linux-fsdevel@vger.kernel.org, chengzhihao1@huawei.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	yi.zhang@huawei.com
Subject: Re: [PATCH] fs/binfmt_elf: Fix memory leak in load_elf_binary()
Date: Tue, 25 Oct 2022 15:24:41 -0700	[thread overview]
Message-ID: <166673667327.2128117.4844279671091670952.b4-ty@chromium.org> (raw)
In-Reply-To: <20221024154421.982230-1-lizetao1@huawei.com>

On Mon, 24 Oct 2022 23:44:21 +0800, Li Zetao wrote:
> There is a memory leak reported by kmemleak:
> 
>   unreferenced object 0xffff88817104ef80 (size 224):
>     comm "xfs_admin", pid 47165, jiffies 4298708825 (age 1333.476s)
>     hex dump (first 32 bytes):
>       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>       60 a8 b3 00 81 88 ff ff a8 10 5a 00 81 88 ff ff  `.........Z.....
>     backtrace:
>       [<ffffffff819171e1>] __alloc_file+0x21/0x250
>       [<ffffffff81918061>] alloc_empty_file+0x41/0xf0
>       [<ffffffff81948cda>] path_openat+0xea/0x3d30
>       [<ffffffff8194ec89>] do_filp_open+0x1b9/0x290
>       [<ffffffff8192660e>] do_open_execat+0xce/0x5b0
>       [<ffffffff81926b17>] open_exec+0x27/0x50
>       [<ffffffff81a69250>] load_elf_binary+0x510/0x3ed0
>       [<ffffffff81927759>] bprm_execve+0x599/0x1240
>       [<ffffffff8192a997>] do_execveat_common.isra.0+0x4c7/0x680
>       [<ffffffff8192b078>] __x64_sys_execve+0x88/0xb0
>       [<ffffffff83bbf0a5>] do_syscall_64+0x35/0x80
> 
> [...]

Applied to for-next/execve, thanks!

[1/1] fs/binfmt_elf: Fix memory leak in load_elf_binary()
      https://git.kernel.org/kees/c/594d2a14f216

-- 
Kees Cook



      parent reply	other threads:[~2022-10-25 22:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 15:44 Li Zetao
2022-10-25 19:02 ` Alexey Dobriyan
2022-10-25 22:24 ` Kees Cook [this message]

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=166673667327.2128117.4844279671091670952.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chengzhihao1@huawei.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizetao1@huawei.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yi.zhang@huawei.com \
    /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