Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:33818 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934246AbcKJPrz (ORCPT ); Thu, 10 Nov 2016 10:47:55 -0500 Subject: Patch "drivers/ptp: Fix kernel memory disclosure" has been added to the 4.8-stable tree To: vlad@tsyrklevich.net, davem@davemloft.net, gregkh@linuxfoundation.org, richardcochran@gmail.com Cc: , From: Date: Thu, 10 Nov 2016 16:47:18 +0100 Message-ID: <1478792838247135@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled drivers/ptp: Fix kernel memory disclosure to the 4.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drivers-ptp-fix-kernel-memory-disclosure.patch and it can be found in the queue-4.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From foo@baz Thu Nov 10 16:43:03 CET 2016 From: Vlad Tsyrklevich Date: Tue, 11 Oct 2016 15:02:47 +0200 Subject: drivers/ptp: Fix kernel memory disclosure From: Vlad Tsyrklevich [ Upstream commit 02a9079c66341836c4914c33c06a73245060df2e ] The reserved field precise_offset->rsv is not cleared before being copied to user space, leaking kernel stack memory. Clear the struct before it's copied. Signed-off-by: Vlad Tsyrklevich Acked-by: Richard Cochran Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/ptp/ptp_chardev.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -193,6 +193,7 @@ long ptp_ioctl(struct posix_clock *pc, u if (err) break; + memset(&precise_offset, 0, sizeof(precise_offset)); ts = ktime_to_timespec64(xtstamp.device); precise_offset.device.sec = ts.tv_sec; precise_offset.device.nsec = ts.tv_nsec; Patches currently in stable-queue which might be from vlad@tsyrklevich.net are queue-4.8/drivers-ptp-fix-kernel-memory-disclosure.patch