Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965812AbdLSJIY (ORCPT ); Tue, 19 Dec 2017 04:08:24 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:41624 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933687AbdLSJIU (ORCPT ); Tue, 19 Dec 2017 04:08:20 -0500 X-Google-Smtp-Source: ACJfBosCez2kELF4/NjR2AugIxplTmhjjNsWNPNDp8RZEvr8roOSM6lE1yvm5Tr3Wj2GPc7fStO8ZVyI55BbpAQ0vAQ= MIME-Version: 1.0 In-Reply-To: <20171219090418.GS19604@eros> References: <001a113e9ca8a3affd05609d7ccf@google.com> <6a50d160-56d0-29f9-cfed-6c9202140b43@I-love.SAKURA.ne.jp> <20171219083746.GR19604@eros> <20171219090418.GS19604@eros> From: Dmitry Vyukov Date: Tue, 19 Dec 2017 10:07:58 +0100 Message-ID: Subject: Re: BUG: bad usercopy in memdup_user To: "Tobin C. Harding" Cc: Kees Cook , Tetsuo Handa , Linux-MM , syzbot , David Windsor , keun-o.park@darkmatter.ae, Laura Abbott , LKML , Mark Rutland , Ingo Molnar , syzkaller-bugs@googlegroups.com, Will Deacon Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1476 Lines: 37 On Tue, Dec 19, 2017 at 10:04 AM, Tobin C. Harding wrote: >> >> > wrote: >> >> >> On 2017/12/18 22:40, syzbot wrote: >> >> >>> Hello, >> >> >>> >> >> >>> syzkaller hit the following crash on 6084b576dca2e898f5c101baef151f7bfdbb606d >> >> >>> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master >> >> >>> compiler: gcc (GCC) 7.1.1 20170620 >> >> >>> .config is attached >> >> >>> Raw console output is attached. >> >> >>> >> >> >>> Unfortunately, I don't have any reproducer for this bug yet. >> >> >>> >> >> >>> >> >> >> >> >> >> This BUG is reporting >> >> >> >> >> >> [ 26.089789] usercopy: kernel memory overwrite attempt detected to 0000000022a5b430 (kmalloc-1024) (1024 bytes) >> >> >> >> >> >> line. But isn't 0000000022a5b430 strange for kmalloc(1024, GFP_KERNEL)ed kernel address? >> >> > >> >> > The address is hashed (see the %p threads for 4.15). >> >> >> >> >> >> +Tobin, is there a way to disable hashing entirely? The only >> >> designation of syzbot is providing crash reports to kernel developers >> >> with as much info as possible. It's fine for it to leak whatever. >> > >> > We have new specifier %px to print addresses in hex if leaking info is >> > not a worry. >> >> This is not a per-printf-site thing. It's per-machine thing. > > There is no way to disable the hashing currently built into the system. Ack. Any kind of continuous testing systems would be a use case for this.