From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753543AbdLDIS3 (ORCPT ); Mon, 4 Dec 2017 03:18:29 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:37579 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753235AbdLDIS1 (ORCPT ); Mon, 4 Dec 2017 03:18:27 -0500 X-Google-Smtp-Source: AGs4zMZ6EV86O41dUh317qtAyhNNsUetMa6px1B5nEfbZAqPQnfjnzgi6axV+QZd3eDJI6nT2jmvEJvNpH5PBywZ+Dc= MIME-Version: 1.0 In-Reply-To: <20171204081408.oyp46roxbkjbxxkw@mwanda> References: <20171203201608.GC844@zzz.localdomain> <20171204081408.oyp46roxbkjbxxkw@mwanda> From: Dmitry Vyukov Date: Mon, 4 Dec 2017 09:18:05 +0100 Message-ID: Subject: Re: WARNING in kmalloc_slab (3) To: Dan Carpenter Cc: Eric Biggers , syzbot , Alexey Dobriyan , Andrew Morton , Arnd Bergmann , dave.jiang@intel.com, LKML , syzkaller-bugs@googlegroups.com, Al Viro , linux-block@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 4, 2017 at 9:14 AM, Dan Carpenter wrote: > On Sun, Dec 03, 2017 at 12:16:08PM -0800, Eric Biggers wrote: >> Looks like BLKTRACESETUP doesn't limit the '.buf_nr' parameter, allowing anyone >> who can open a block device to cause an extremely large kmalloc. Here's a >> simplified reproducer: >> > > There are lots of places which allow people to allocate as much as they > want. With Syzcaller, you might want to just hard code a __GFP_NOWARN > in to disable it. Hi, Hard code it where? User-controllable allocation are supposed to use __GFP_NOWARN.