From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 16 Jun 2016 00:50:47 +0100 From: Al Viro To: Andy Lutomirski Cc: Linux FS Devel , Stephen Rothwell , Andrew Morton , stable@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH v2 1/2] fs: Improve and simplify copy_mount_options Message-ID: <20160615235047.GA14480@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Mon, Jun 13, 2016 at 07:36:04PM -0700, Andy Lutomirski wrote: > copy_mount_options always tries to copy a full page even if the > string is shorter than a page. If the string starts part-way into a > page and ends on the same page it started on, this means that > copy_mount_options can overrun the supplied buffer and read into the > next page. Have you considered the possibility that there might be a reason for having separate copy_mount_option() and copy_mount_string()? Such as options not being a string, perhaps? In some filesystems (including older NFS variants) it is not a string at all - a binary data structure, with quite a few zero bytes in it. And no, we fucking *can't* break mount.nfs(8), no matter how we'd like to get rid of that wart of an ABI. IOW, NAK with prejudice - don't bring that thing back, it's hard no-go.