From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 30 Oct 2017 17:57:48 +0800 From: Ye Xiaolong Message-ID: <20171030095748.GL3294@yexl-desktop> References: <1508798008-1692-1-git-send-email-me@tobin.cc> <20171025162213.GH3294@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [kernel-hardening] Re: [lkp-robot] [printk] 7f7c60e066: BUG:KASAN:slab-out-of-bounds To: Kees Cook Cc: "Tobin C. Harding" , kernel-hardening@lists.openwall.com, "Jason A. Donenfeld" , Theodore Ts'o , Linus Torvalds , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , LKML , LKP List-ID: On 10/30, Kees Cook wrote: >On Wed, Oct 25, 2017 at 9:22 AM, kernel test robot > wrote: >> >> FYI, we noticed the following commit (built with gcc-4.9): >> >> commit: 7f7c60e0663645e757e520245606fde9c6e326bb ("printk: hash addresses printed with %p") >> url: https://github.com/0day-ci/linux/commits/Tobin-C-Harding/printk-hash-addresses-printed-with-p/20171024-231922 > >It's not clear to me which of the various versions this test ran We'll improve it by showing the version info for LKML patchset. Thanks, Xiaolong >against, but it seems like the printf self-tests got very confused by >the results: > >> [ 40.275423] test_printf: kvasprintf(..., "%p %p", ...) returned '3cf9adbe eff717bf', expected '0000000001234567 fffffffffedcba98' >> [ 40.296739] test_printf: vsnprintf(buf, 256, "|%-*p|%*p|", ...) returned 19, expected 39 >> [ 40.322776] test_printf: vsnprintf(buf, 16, "|%-*p|%*p|", ...) returned 19, expected 39 >> [ 40.334834] test_printf: vsnprintf(buf, 0, "|%-*p|%*p|", ...) returned 19, expected 39 > >I assume v10 will fix the width issues, but probably not the value tests... > >And it claims a use-after-free, too: > >> [ 39.757461] The buggy address belongs to the object at 22cb34bb >> [ 39.757461] which belongs to the cache kmalloc-32 of size 32 >> [ 39.757461] The buggy address is located 0 bytes inside of >> [ 39.757461] 32-byte region [22cb34bb, 24ac3a60) > >Which becomes rather unreadable, since the address got hashed. :P > >-Kees > >-- >Kees Cook >Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7012561838496612549==" MIME-Version: 1.0 From: Ye Xiaolong To: lkp@lists.01.org Subject: Re: [lkp-robot] [printk] 7f7c60e066: BUG:KASAN:slab-out-of-bounds Date: Mon, 30 Oct 2017 17:57:48 +0800 Message-ID: <20171030095748.GL3294@yexl-desktop> In-Reply-To: List-Id: --===============7012561838496612549== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 10/30, Kees Cook wrote: >On Wed, Oct 25, 2017 at 9:22 AM, kernel test robot > wrote: >> >> FYI, we noticed the following commit (built with gcc-4.9): >> >> commit: 7f7c60e0663645e757e520245606fde9c6e326bb ("printk: hash addresse= s printed with %p") >> url: https://github.com/0day-ci/linux/commits/Tobin-C-Harding/printk-has= h-addresses-printed-with-p/20171024-231922 > >It's not clear to me which of the various versions this test ran We'll improve it by showing the version info for LKML patchset. Thanks, Xiaolong >against, but it seems like the printf self-tests got very confused by >the results: > >> [ 40.275423] test_printf: kvasprintf(..., "%p %p", ...) returned '3cf9= adbe eff717bf', expected '0000000001234567 fffffffffedcba98' >> [ 40.296739] test_printf: vsnprintf(buf, 256, "|%-*p|%*p|", ...) retur= ned 19, expected 39 >> [ 40.322776] test_printf: vsnprintf(buf, 16, "|%-*p|%*p|", ...) return= ed 19, expected 39 >> [ 40.334834] test_printf: vsnprintf(buf, 0, "|%-*p|%*p|", ...) returne= d 19, expected 39 > >I assume v10 will fix the width issues, but probably not the value tests... > >And it claims a use-after-free, too: > >> [ 39.757461] The buggy address belongs to the object at 22cb34bb >> [ 39.757461] which belongs to the cache kmalloc-32 of size 32 >> [ 39.757461] The buggy address is located 0 bytes inside of >> [ 39.757461] 32-byte region [22cb34bb, 24ac3a60) > >Which becomes rather unreadable, since the address got hashed. :P > >-Kees > >-- = >Kees Cook >Pixel Security --===============7012561838496612549==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753450AbdJaBwc (ORCPT ); Mon, 30 Oct 2017 21:52:32 -0400 Received: from mga01.intel.com ([192.55.52.88]:50061 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753247AbdJaBwb (ORCPT ); Mon, 30 Oct 2017 21:52:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,321,1505804400"; d="scan'208";a="1031425157" Date: Mon, 30 Oct 2017 17:57:48 +0800 From: Ye Xiaolong To: Kees Cook Cc: "Tobin C. Harding" , kernel-hardening@lists.openwall.com, "Jason A. Donenfeld" , "Theodore Ts'o" , Linus Torvalds , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , LKML , LKP Subject: Re: [lkp-robot] [printk] 7f7c60e066: BUG:KASAN:slab-out-of-bounds Message-ID: <20171030095748.GL3294@yexl-desktop> References: <1508798008-1692-1-git-send-email-me@tobin.cc> <20171025162213.GH3294@yexl-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30, Kees Cook wrote: >On Wed, Oct 25, 2017 at 9:22 AM, kernel test robot > wrote: >> >> FYI, we noticed the following commit (built with gcc-4.9): >> >> commit: 7f7c60e0663645e757e520245606fde9c6e326bb ("printk: hash addresses printed with %p") >> url: https://github.com/0day-ci/linux/commits/Tobin-C-Harding/printk-hash-addresses-printed-with-p/20171024-231922 > >It's not clear to me which of the various versions this test ran We'll improve it by showing the version info for LKML patchset. Thanks, Xiaolong >against, but it seems like the printf self-tests got very confused by >the results: > >> [ 40.275423] test_printf: kvasprintf(..., "%p %p", ...) returned '3cf9adbe eff717bf', expected '0000000001234567 fffffffffedcba98' >> [ 40.296739] test_printf: vsnprintf(buf, 256, "|%-*p|%*p|", ...) returned 19, expected 39 >> [ 40.322776] test_printf: vsnprintf(buf, 16, "|%-*p|%*p|", ...) returned 19, expected 39 >> [ 40.334834] test_printf: vsnprintf(buf, 0, "|%-*p|%*p|", ...) returned 19, expected 39 > >I assume v10 will fix the width issues, but probably not the value tests... > >And it claims a use-after-free, too: > >> [ 39.757461] The buggy address belongs to the object at 22cb34bb >> [ 39.757461] which belongs to the cache kmalloc-32 of size 32 >> [ 39.757461] The buggy address is located 0 bytes inside of >> [ 39.757461] 32-byte region [22cb34bb, 24ac3a60) > >Which becomes rather unreadable, since the address got hashed. :P > >-Kees > >-- >Kees Cook >Pixel Security