From: Davidlohr Bueso <dave@stgolabs.net>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Manfred Spraul <manfred@colorfullife.com>,
"Eric W . Biederman" <ebiederm@xmission.com>,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] ipc/shm: fix use-after-free of shm file via remap_file_pages()
Date: Tue, 10 Apr 2018 09:05:21 -0700 [thread overview]
Message-ID: <20180410160521.ybi6g2r7b43eb2di@linux-n805> (raw)
In-Reply-To: <20180409043039.28915-1-ebiggers3@gmail.com>
On Sun, 08 Apr 2018, Eric Biggers wrote:
>@@ -480,6 +487,7 @@ static int shm_release(struct inode *ino, struct file *file)
> struct shm_file_data *sfd = shm_file_data(file);
>
> put_ipc_ns(sfd->ns);
>+ fput(sfd->file);
> shm_file_data(file) = NULL;
> kfree(sfd);
> return 0;
>@@ -1432,7 +1440,7 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg,
> file->f_mapping = shp->shm_file->f_mapping;
> sfd->id = shp->shm_perm.id;
> sfd->ns = get_ipc_ns(ns);
>- sfd->file = shp->shm_file;
>+ sfd->file = get_file(shp->shm_file);
> sfd->vm_ops = NULL;
This probably merits a comment as it is adhoc to remap_file_pages(),
but otherwise:
Acked-by: Davidlohr Bueso <dbueso@suse.de>
prev parent reply other threads:[~2018-04-10 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <94eb2c06f65e5e2467055d036889@google.com>
2018-04-09 4:30 ` Eric Biggers
2018-04-09 9:48 ` Kirill A. Shutemov
2018-04-09 18:50 ` Eric Biggers
2018-04-09 20:12 ` Davidlohr Bueso
2018-04-09 20:26 ` Davidlohr Bueso
2018-04-09 20:36 ` Eric Biggers
2018-04-10 7:58 ` Kirill A. Shutemov
2018-04-10 19:14 ` Eric Biggers
2018-04-10 19:28 ` [PATCH v2] " Eric Biggers
2018-04-10 16:05 ` Davidlohr Bueso [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=20180410160521.ybi6g2r7b43eb2di@linux-n805 \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=ebiggers3@gmail.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=manfred@colorfullife.com \
--cc=syzkaller-bugs@googlegroups.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